コード例 #1
0
 def showAbout(qt_viewer):
     d = QDialog()
     d.setObjectName('QtAboutKeybindings')
     d.setStyleSheet(qt_viewer.styleSheet())
     d.setWindowTitle('Keybindings')
     qt_viewer._about_keybindings = QtAboutKeybindings(qt_viewer.viewer, d)
     d.show()
     d.setWindowModality(Qt.NonModal)
     d.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
     qt_viewer._about_keybindings_dialog = d
コード例 #2
0
 def __show_qrcode(self) -> None:
     """Save to image file."""
     dlg = QDialog(self)
     dlg.setWindowTitle("Mechanism QR code")
     dlg.setModal(True)
     layout = QVBoxLayout(dlg)
     label = QLabel(dlg)
     layout.addWidget(label)
     label.setPixmap(self.image)
     dlg.setFixedSize(self.image.size())
     dlg.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
     dlg.show()