當前位置: 首頁>>代碼示例>>Python>>正文


Python QMessageBox.about方法代碼示例

本文整理匯總了Python中PyQt5.QtWidgets.QMessageBox.about方法的典型用法代碼示例。如果您正苦於以下問題:Python QMessageBox.about方法的具體用法?Python QMessageBox.about怎麽用?Python QMessageBox.about使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PyQt5.QtWidgets.QMessageBox的用法示例。


在下文中一共展示了QMessageBox.about方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: downloaded

# 需要導入模塊: from PyQt5.QtWidgets import QMessageBox [as 別名]
# 或者: from PyQt5.QtWidgets.QMessageBox import about [as 別名]
def downloaded(self, t, slices):
        """finish a video downloading
        """
        print('downloaded')
        for k, v in self.row2qthread.items():
            if v == t:
                if slices == -1:
                    s = '下載出錯:'+ self.downloadWidget.item(k, 0).text()
                    item = QTableWidgetItem(s)
                    self.downloadWidget.setItem(k, 0, item)
                elif slices == -2:
                    s = '結束下載:'+ self.downloadWidget.item(k, 0).text()
                    item = QTableWidgetItem(s)
                    self.downloadWidget.setItem(k, 0, item)
                else:
                    item = QTableWidgetItem('{0}/{0}'.format(slices))
                    self.downloadWidget.setItem(k, 2, item)
                    QMessageBox.about(self, '嗶哩嗶哩工具箱 v1.1 - ©Tich', '{} 下載完成!'.format(self.downloadWidget.item(k, 0).text()))
                break 
開發者ID:taseikyo,項目名稱:PyQt5-Apps,代碼行數:21,代碼來源:main.py

示例2: keyPressEvent

# 需要導入模塊: from PyQt5.QtWidgets import QMessageBox [as 別名]
# 或者: from PyQt5.QtWidgets.QMessageBox import about [as 別名]
def keyPressEvent(self, event):
        if event.key() == Qt.Key_Escape:
            self.reset_view()

        if event.key() == Qt.Key_F1:
            self.set_alias_visibility(not self.aliases_visible)

        if event.key() == Qt.Key_F2:
            self.set_port_visibility(not self.ports_visible)

        if event.key() == Qt.Key_F3:
            self.set_subport_visibility(not self.subports_visible)


        if event.key() == Qt.Key_Question:
            help_str = """
            Mouse control:
              Mousewheel: Zoom in and out
              Right-click & drag: Zoom to rectangle
              Middle-click & drag: Pan

            Keyboard shortcuts:
              Esc: Reset view
              F1: Show/hide alias names
              F2: Show/hide ports
              F3: Show/hide subports (ports in underlying references)
            """
            QMessageBox.about(self, 'PHIDL Help', help_str) 
開發者ID:amccaugh,項目名稱:phidl,代碼行數:30,代碼來源:quickplotter.py

示例3: about

# 需要導入模塊: from PyQt5.QtWidgets import QMessageBox [as 別名]
# 或者: from PyQt5.QtWidgets.QMessageBox import about [as 別名]
def about(self):QMessageBox.about(self,'關於','作者:\thgjazhgj  \n項目地址:https://github.com/hgjazhgj/FGO-py  \n聯係方式:huguangjing0411@geektip.cc  \n防呆不放蠢,大力出奇跡!') 
開發者ID:hgjazhgj,項目名稱:FGO-py,代碼行數:3,代碼來源:fgoGui.py

示例4: createNewFile

# 需要導入模塊: from PyQt5.QtWidgets import QMessageBox [as 別名]
# 或者: from PyQt5.QtWidgets.QMessageBox import about [as 別名]
def createNewFile(self):
        """File is created in Groot/ in Google Drive
        heading: file with title in the GUI is passed as heading
        summary: file content"""

        result = createFile(self.titleEdit.text(),self.summaryEdit.toPlainText())
        if result == 'Successful':
            QMessageBox.about(self, "Successful","File Creation Successful")
        else:
            QMessageBox.about(self,"Warning",result) 
開發者ID:ugroot,項目名稱:GROOT,代碼行數:12,代碼來源:notesWindow.py

示例5: passwordCollection

# 需要導入模塊: from PyQt5.QtWidgets import QMessageBox [as 別名]
# 或者: from PyQt5.QtWidgets.QMessageBox import about [as 別名]
def passwordCollection(self):
        details = {'Sender':self.senderEdit.text(),'Receiver':self.receiverEdit.text(),'Subject':self.subjectEdit.text(),'Message':self.messageEdit.toPlainText()}
        self.passwordText = self.confirmWindow.passwordEdit.text()
        details['Password'] = self.passwordText
        reply = shootMail(details)
        if reply == 'Success':
            QMessageBox.about(self, "Successful","Mail Sent Succesfully")
        else:
            QMessageBox.about(self,"Warning Error Occured",reply) 
開發者ID:ugroot,項目名稱:GROOT,代碼行數:11,代碼來源:mailWindow.py

示例6: messageBox

# 需要導入模塊: from PyQt5.QtWidgets import QMessageBox [as 別名]
# 或者: from PyQt5.QtWidgets.QMessageBox import about [as 別名]
def messageBox(self, showInfo):
        """:author : Tich
        show information."""
        box = QMessageBox.about(self, 'Words Recoder 1.0', showInfo) 
開發者ID:taseikyo,項目名稱:PyQt5-Apps,代碼行數:6,代碼來源:main.py

示例7: connectSlots

# 需要導入模塊: from PyQt5.QtWidgets import QMessageBox [as 別名]
# 或者: from PyQt5.QtWidgets.QMessageBox import about [as 別名]
def connectSlots(base, w):
    """:author : Tich
    connect w with base slots
    """
    # close event
    w.actionexit.triggered.connect(base.close)
    # about
    w.actionabout.triggered.connect(lambda: base.messageBox("Words Recoder 1.0: Recod unknown words into the MySQL database."))
    # heko
    w.actionhelp.triggered.connect(lambda: base.messageBox("1.click 'File - connect' to connect MySQL.\
                                                                                               \n2. click button 'insert' to insert new word. \
                                                                                              \n3. click button 'query' to query word."))
    # import data via file
    w.actionimport.triggered.connect(lambda: base.importData(w)) 
    # export data as .csv file
    w.actionexport.triggered.connect(base.exportDataAsCSV) 
    # connect to MySQL
    w.actionconnect.triggered.connect(lambda: base.connectDatabase(w)) 

    w.insert.clicked.connect(lambda: base.insert(w))
    w.insert.setShortcut('Ctrl+Return')

    w.query.clicked.connect(lambda: base.query(w))
    w.query.setShortcut('Ctrl+Q')

    w.update.clicked.connect(lambda: base.update(w))
    w.update.setShortcut('Ctrl+U')

    w.delet.clicked.connect(lambda: base.delete(w))
    w.delet.setShortcut('Ctrl+D') 
開發者ID:taseikyo,項目名稱:PyQt5-Apps,代碼行數:32,代碼來源:main.py

示例8: buyTicket

# 需要導入模塊: from PyQt5.QtWidgets import QMessageBox [as 別名]
# 或者: from PyQt5.QtWidgets.QMessageBox import about [as 別名]
def buyTicket(self,freq,button):
		'''買票操作'''
		choice = freq.currentIndex()
		city = self.comboBox.currentIndex() 
		amount = int(button.text()) # 獲得單行文本框內容

		if amount <= self.TicketList[city][choice]:
			self.TicketList[city][choice] -= amount
			QMessageBox.about(self,"購票提示","成功購票!")
			self.searchTicket()

		else:
			QMessageBox.warning(self,"購票提示","車票數量不夠,請重新購票!") 
開發者ID:Yeah-Kun,項目名稱:python,代碼行數:15,代碼來源:buy_ticket.py

示例9: about

# 需要導入模塊: from PyQt5.QtWidgets import QMessageBox [as 別名]
# 或者: from PyQt5.QtWidgets.QMessageBox import about [as 別名]
def about(self):
        s = ('<b>WONAMBI Version {version}</b><br />'
             '<p>You can download the latest version at '
             '<a href="https://github.com/wonambi-python/wonambi">'
             'https://github.com/wonambi-python/wonambi</a> '
             'or you can upgrade to the latest release with:'
             '</p><p>'
             '<code>pip install --upgrade wonambi</code>'
             '</p><p>'
             'Copyright &copy; 2013-{year} '
             '<a href="http://www.gpiantoni.com">Gio Piantoni</a>, '
             "Jordan O'Byrne"
             '</p><p>'
             'This program is free software: you can redistribute it '
             'and/or modify it under the terms of the GNU General Public '
             'License as published by the Free Software Foundation, either '
             'version 3 of the License, or (at your option) any later version.'
             '</p><p>'
             'This program is distributed in the hope that it will be useful, '
             'but WITHOUT ANY WARRANTY; without even the implied warranty of '
             'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the '
             'GNU General Public License for more details.'
             '</p><p>'
             'You should have received a copy of the GNU General Public '
             'License along with this program.  If not, see '
             '<a href="http://www.gnu.org/licenses/">'
             'http://www.gnu.org/licenses/</a>.'
             '</p><p>'
             'Other licenses available, contact the author'
             '</p>')
        QMessageBox.about(self, 'WONAMBI', s.format(version=__version__,
                                                    year=now.year)) 
開發者ID:wonambi-python,項目名稱:wonambi,代碼行數:34,代碼來源:scroll_data.py

示例10: on_show_about_clicked

# 需要導入模塊: from PyQt5.QtWidgets import QMessageBox [as 別名]
# 或者: from PyQt5.QtWidgets.QMessageBox import about [as 別名]
def on_show_about_clicked(self):
        descr = "<b><h2>Universal Radio Hacker</h2></b>Version: {0}<br />" \
                "GitHub: <a href='https://github.com/jopohl/urh'>https://github.com/jopohl/urh</a><br /><br />" \
                "Creators:<i><ul><li>" \
                "Johannes Pohl &lt;<a href='mailto:joahnnes.pohl90@gmail.com'>johannes.pohl90@gmail.com</a>&gt;</li>" \
                "<li>Andreas Noack &lt;<a href='mailto:andreas.noack@hochschule-stralsund.de'>andreas.noack@hochschule-stralsund.de</a>&gt;</li>" \
                "</ul></i>".format(version.VERSION)

        QMessageBox.about(self, self.tr("About"), self.tr(descr)) 
開發者ID:jopohl,項目名稱:urh,代碼行數:11,代碼來源:MainController.py

示例11: _logging_error

# 需要導入模塊: from PyQt5.QtWidgets import QMessageBox [as 別名]
# 或者: from PyQt5.QtWidgets.QMessageBox import about [as 別名]
def _logging_error(self, log_conf, msg):
        QMessageBox.about(self, "Log error", "Error when starting log config"
                                             " [{}]: {}".format(log_conf.name,
                                                                msg)) 
開發者ID:bitcraze,項目名稱:crazyflie-clients-python,代碼行數:6,代碼來源:main.py

示例12: _logging_error

# 需要導入模塊: from PyQt5.QtWidgets import QMessageBox [as 別名]
# 或者: from PyQt5.QtWidgets.QMessageBox import about [as 別名]
def _logging_error(self, log_conf, msg):
        """Callback from the log layer when an error occurs"""
        QMessageBox.about(self, "Plot error", "Error when starting log config"
                          " [%s]: %s" % (log_conf.name, msg)) 
開發者ID:bitcraze,項目名稱:crazyflie-clients-python,代碼行數:6,代碼來源:GpsTab.py

示例13: _logging_error

# 需要導入模塊: from PyQt5.QtWidgets import QMessageBox [as 別名]
# 或者: from PyQt5.QtWidgets.QMessageBox import about [as 別名]
def _logging_error(self, log_conf, msg):
        QMessageBox.about(self, "Log error",
                          "Error when starting log config [%s]: %s" % (
                              log_conf.name, msg)) 
開發者ID:bitcraze,項目名稱:crazyflie-clients-python,代碼行數:6,代碼來源:FlightTab.py

示例14: _logging_error

# 需要導入模塊: from PyQt5.QtWidgets import QMessageBox [as 別名]
# 或者: from PyQt5.QtWidgets.QMessageBox import about [as 別名]
def _logging_error(self, log_conf, msg):
        """Callback from the log layer when an error occurs"""

        QMessageBox.about(
            self, "Example error", "Error when using log config"
            " [{0}]: {1}".format(log_conf.name, msg)) 
開發者ID:bitcraze,項目名稱:crazyflie-clients-python,代碼行數:8,代碼來源:QualisysTab.py

示例15: _logging_error

# 需要導入模塊: from PyQt5.QtWidgets import QMessageBox [as 別名]
# 或者: from PyQt5.QtWidgets.QMessageBox import about [as 別名]
def _logging_error(self, log_conf, msg):
        """Callback from the log layer when an error occurs"""
        QMessageBox.about(
            self, "Plot error", "Error when starting log config [%s]: %s" % (
                log_conf.name, msg)) 
開發者ID:bitcraze,項目名稱:crazyflie-clients-python,代碼行數:7,代碼來源:PlotTab.py


注:本文中的PyQt5.QtWidgets.QMessageBox.about方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。