mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 05:53:10 +02:00
...
This commit is contained in:
parent
61a3c2aae4
commit
08dada2281
2 changed files with 6 additions and 2 deletions
|
|
@ -42,7 +42,7 @@ def __init__(self, parent):
|
|||
ic.setMaximumHeight(100)
|
||||
ic.setScaledContents(True)
|
||||
ic.setStyleSheet('QLabel { margin-right: 10px }')
|
||||
self.bb = QDialogButtonBox(QDialogButtonBox.Yes|QDialogButtonBox.No)
|
||||
self.bb = QDialogButtonBox()
|
||||
self.bb.accepted.connect(self.accept)
|
||||
self.bb.rejected.connect(self.reject)
|
||||
self.log_button = self.bb.addButton(_('View log'), self.bb.ActionRole)
|
||||
|
|
@ -59,6 +59,7 @@ def __init__(self, parent):
|
|||
_('Show detailed information about this error'))
|
||||
self.det_msg = QPlainTextEdit(self)
|
||||
self.det_msg.setReadOnly(True)
|
||||
self.bb.setStandardButtons(self.bb.Yes|self.bb.No)
|
||||
self.bb.button(self.bb.Yes).setDefault(True)
|
||||
|
||||
l.addWidget(ic, 0, 0, 1, 1)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
from calibre.gui2 import Application
|
||||
from PyQt4.Qt import (QDialog, QGridLayout, QListWidget, QDialogButtonBox,
|
||||
QPushButton, QTimer)
|
||||
QPushButton, QTimer, QIcon)
|
||||
|
||||
app = Application([], force_calibre_style=True)
|
||||
|
||||
|
|
@ -23,7 +23,10 @@
|
|||
bb.setStandardButtons(bb.Close)
|
||||
bb.accepted.connect(d.accept)
|
||||
bb.rejected.connect(d.reject)
|
||||
b = bb.addButton('Action', bb.ActionRole)
|
||||
b.setIcon(QIcon(I('wizard.png')))
|
||||
l.addWidget(bb, 2, 0, 1, 2)
|
||||
bb.button(bb.Close).setDefault(True)
|
||||
|
||||
b = QPushButton('Normal')
|
||||
l.addWidget(b, 0, 1, 1, 1)
|
||||
|
|
|
|||
Loading…
Reference in a new issue