Python PyQt5.Qt() Examples
The following are 4
code examples of PyQt5.Qt().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
PyQt5
, or try the search function
.
Example #1
Source File: ui.py From ida-minsc with BSD 3-Clause "New" or "Revised" License | 5 votes |
def reset(cls): '''Remove all currently registered menu items.''' for path, name in six.iterkeys(state): cls.rm(path, name) return ### Qt wrappers and namespaces
Example #2
Source File: ui.py From ida-minsc with BSD 3-Clause "New" or "Revised" License | 5 votes |
def application(): '''Return the current instance of the IDA Application.''' q = PyQt5.Qt.qApp return q.instance()
Example #3
Source File: ui.py From ida-minsc with BSD 3-Clause "New" or "Revised" License | 5 votes |
def __init__(self, blocking=True): self.object = res = PyQt5.Qt.QProgressDialog() res.setVisible(False) res.setWindowModality(blocking) res.setAutoClose(True) path = u"{:s}/{:s}".format(_database.config.path(), _database.config.filename()) self.update(current=0, min=0, max=0, text=u'Processing...', tooltip=u'...', title=path) # properties
Example #4
Source File: bwh_ma.py From BandwagongVPS_controller with GNU General Public License v3.0 | 4 votes |
def __init__(self,TAR,head,web_payload,trans,parent=None): super().__init__() self.tray = QSystemTrayIcon(self)#托盘类 self.trans = trans self.icon = QIcon() self.icon.addPixmap(QPixmap("final.ico")) self.web_payload = web_payload #self.timer = QTimer(self) #self.timer.timeout.connect(self.warn) #self.timer.start(20*1000) self.quitAction = QAction(self.tr("&Quit"),self,triggered=qApp.quit) self.showAction = QAction(self.tr("&Show"),self,triggered=self.showNormal) self.Tray_icon_menu = QMenu(self) self.Tray_icon_menu.addAction(self.showAction) self.Tray_icon_menu.addAction(self.quitAction) self.tray.setContextMenu(self.Tray_icon_menu) self.tray.setIcon(self.icon) self.setWindowIcon(self.icon) self.tray.activated.connect(self.db_cilcked) self.tray.messageClicked.connect(self.showNormal) self.tray.show() self.bwh_stat = bwh_stat(TAR,head,self.web_payload,self.trans)#初始化信息窗体 self.bwh_control =bwh_controls(self,TAR,head,self.web_payload,self.trans)#初始化控制窗体 #根据trans的值改变输出内容 if self.trans == 0: self.tray.setToolTip(self.tr("IP : %s\nRAM : %s%%\nSwap : %s%% \nBandwidth : %s%% "%(self.bwh_stat.info_data['ip_addresses'][0],str(self.bwh_stat.ram_stat_value),\ str(self.bwh_stat.swap_stat_value),str(self.bwh_stat.data_usage_value)))) elif self.trans == 1: self.tray.setToolTip(self.tr("IP地址 : %s\n内存 : %s%%\n交换分区 : %s%% \n流量使用情况 : %s%% "%(self.bwh_stat.info_data['ip_addresses'][0],str(self.bwh_stat.ram_stat_value),\ str(self.bwh_stat.swap_stat_value),str(self.bwh_stat.data_usage_value)))) self.setWindowTitle(self.tr("bwh_contorler")) self.setWindowFlags(Qt.MSWindowsFixedSizeDialogHint|Qt.Window) self.tabwidget = QTabWidget(self) self.tabwidget.addTab(self.bwh_stat,self.tr("bwh_stat")) self.tabwidget.addTab(self.bwh_control,self.tr("bwh_control")) self.vbox = QVBoxLayout() self.vbox.addWidget(self.tabwidget) self.setLayout(self.vbox) self.resize(800,600) self.setFixedSize(800,600)