Also addressing similar errors such as QtGui/QDialog file not found. All of these are because Qt5 moved these widgets from QtGui to QtWidgets. A Qt5-specific change would be to switch to #include<QtWidgets/QWidget>#include<QtWidgets/QDialog> ...
示例4: PowerNotificationDialog ▲点赞 2▼ classPowerNotificationDialog(QDialog):''' Dialog to notify about system power changing state. '''message ="No message set"def__init__(self, parent=None):super(PowerNotificationDialog, self).__init__(parent) self.setWindowFlags(Qt.Dialog | Qt.Frame...
# 需要导入模块: from PyQt5 import QtGui [as 别名]# 或者: from PyQt5.QtGui importQLabel[as 别名]defmake_cellnotcell(parent):""" buttons for cell / not cell views at top """# number of ROIs in each imageparent.lcell0 = QtGui.QLabel("") parent.lcell0.setStyleSheet("color: whit...
class Downloader(QDialog): " MultiThreaded GUI Downloader Dialog " def __init__(self, parent=None, url_to_download=None, fout=None): " init class " super(Downloader, self).__init__(parent) self.timer = time() self.httpGetId = 0 self.httpRequestAborted = False self.url = QUrl(url...
class QuestionDlg(QDialog): def __init__(self,parent=None): super(QuestionDlg,self).__init__(parent) # self.setStyleSheet("background-image:url('image/panelbg.jpg'); border: 2px; border-radius 2px;") self.setWindowFlags(Qt.CustomizeWindowHint) # self.setStyleSheet("border: 2px; bord...
self.keyIcon =QIcon() self.keyIcon.addPixmap(self.style().standardPixmap(QStyle.SP_FileIcon)) self.clearButton = QPushButton(self.tr('Clear')) self.clearButton.setToolTip(self.tr('Clear history')) self.buttonBox.addButton(self.clearButton, QDialogButtonBox.ActionRole) ...
classOrderDlg(QDialog):def__init__(self, parent=None):super(OrderDlg, self).__init__(parent) self.create_widgets() self.layout_widgets() self.setMinimumWidth(850) self.setWindowTitle(u'Список Order Item')defcreate_widgets(self):self.model = QtSql.QSqlTableModel(self) ...
class PlottingDlg(QDialog): def __init__(self, data, *args): QDialog.__init__(self, *args) self._auto_update = False self._file_format = None self.thread = None self.data = data self.ui = Ui_PlottingDlg() self.ui.setupUi(self) self.options_button = self.ui.buttonBox.addButto...
class ShowArrayValueDlg(QDialog): def __init__(self, pvname, savedValue, liveValue=None, parent=None): super(ShowArrayValueDlg, self).__init__(parent) self.setWindowTitle('waveform data') self.savedValue=savedValue self.liveValue=liveValue # create table tableview = self.createTable() ...
self.save_button =QPushButton(get_icon("filesave.png"),"Save", self) self.disable_button =QPushButton(get_icon("delete.png"),"Disable", self) self.refresh_button =QPushButton(get_icon("restart.png"),"Refresh", self) hlayout = QHBoxLayout() ...