示例#1
0
def find_window(name):
    for widget in QApplication.topLevelWidgets():
        if widget.objectName() == name:
            return widget
    return None
示例#2
0
def find_window(name):
    for widget in QApplication.topLevelWidgets():
        if widget.objectName() == name:
            return widget
    return None
示例#3
0
def close_msg_boxes():
    for w in QApplication.topLevelWidgets():
        if isinstance(w, QMessageBox):
            print('Closing message box')
            QTest.keyClick(w, Qt.Key_Enter)