Set more parents
This commit is contained in:
parent
2779b2f42e
commit
8d9280d1d8
@ -205,7 +205,7 @@ class TabbedBrowser(TabWidget):
|
||||
# FIXME that does not what I expect
|
||||
tab = self._widget(count)
|
||||
if tab is not None:
|
||||
preview = QPrintPreviewDialog()
|
||||
preview = QPrintPreviewDialog(self)
|
||||
preview.paintRequested.connect(tab.print)
|
||||
preview.exec_()
|
||||
|
||||
|
@ -364,7 +364,7 @@ class CompletionItemDelegate(QStyledItemDelegate):
|
||||
text_option.setAlignment(QStyle.visualAlignment(
|
||||
self.opt.direction, self.opt.displayAlignment))
|
||||
|
||||
self.doc = QTextDocument()
|
||||
self.doc = QTextDocument(self)
|
||||
if index.parent().isValid():
|
||||
self.doc.setPlainText(self.opt.text)
|
||||
else:
|
||||
|
@ -44,8 +44,8 @@ class CrashDialog(QDialog):
|
||||
self.setWindowTitle('Whoops!')
|
||||
self.setModal(True)
|
||||
|
||||
self.vbox = QVBoxLayout()
|
||||
self.lbl = QLabel(self)
|
||||
self.vbox = QVBoxLayout(self)
|
||||
self.lbl = QLabel()
|
||||
text = ('Argh! qutebrowser crashed unexpectedly.<br/>'
|
||||
'Please review the info below to remove sensitive data and '
|
||||
'then submit it to <a href="mailto:crash@qutebrowser.org">'
|
||||
@ -57,19 +57,19 @@ class CrashDialog(QDialog):
|
||||
self.lbl.setWordWrap(True)
|
||||
self.vbox.addWidget(self.lbl)
|
||||
|
||||
self.txt = QTextEdit(self)
|
||||
self.txt = QTextEdit()
|
||||
self.txt.setReadOnly(True)
|
||||
self.txt.setText(self._crash_info(pages, cmdhist, exc))
|
||||
self.vbox.addWidget(self.txt)
|
||||
self.setLayout(self.vbox)
|
||||
|
||||
self.hbox = QHBoxLayout()
|
||||
self.btn_quit = QPushButton(self)
|
||||
self.hbox = QHBoxLayout(self)
|
||||
self.btn_quit = QPushButton()
|
||||
self.btn_quit.setText('Quit')
|
||||
self.btn_quit.clicked.connect(self.reject)
|
||||
self.hbox.addWidget(self.btn_quit)
|
||||
if pages:
|
||||
self.btn_restore = QPushButton(self)
|
||||
self.btn_restore = QPushButton()
|
||||
self.btn_restore.setText('Restore tabs')
|
||||
self.btn_restore.clicked.connect(self.accept)
|
||||
self.btn_restore.setDefault(True)
|
||||
|
Loading…
Reference in New Issue
Block a user