예제 #1
0
def qMsgBoxAbout(parentWidg, titleMsgBx, messageMsgBx):
    qmsgParent = None
    if(parentWidg is not None):
        qmsgParent = parentWidg
    reply = QMessageBox.Ok
    try:
        reply = QMessageBox.about(qmsgParent, titleMsgBx, messageMsgBx)
    except:
        parentScreen = QtGui.QApplication.desktop().screen(QtGui.QApplication.desktop().primaryScreen())
        qmsgParent = QtGui.QMainWindow(parentScreen)
        reply = QMessageBox.about(qmsgParent, titleMsgBx, messageMsgBx)
    return reply
예제 #2
0
def about_message(message, parent=None):
    """
    Shows an about message
    :param message: str
    :param parent: QWidget
    """

    parent = None
    message_box = QMessageBox(parent)
    flags = message_box.windowFlags(
    ) ^ Qt.WindowContextHelpButtonHint | Qt.WindowStaysOnTopHint
    message_box.setWindowFlags(flags)
    message_box.about(parent, 'About', message)