Exemplo n.º 1
0
 def watchdog(self):
     for thread in self.threads.values():
         if thread.is_alive():
             return
     if not self.disable_qt_management:
         self.timer.stop()
         QApplication.closeAllWindows()
         QApplication.exit()
Exemplo n.º 2
0
 def quit(self):
     QApplication.closeAllWindows()
Exemplo n.º 3
0
    tv = QTreeView(dialog)
    tv.setModel(model)
    tv.setAlternatingRowColors(True)
    layout.addWidget(tv)

    label = QLabel("Search for the following person")
    layout.addWidget(label)

    buts = []
    frame = QFrame(dialog)
    layout2 = QHBoxLayout(frame)

    for person in model.people:
        but = QPushButton(person.fname, frame)
        buts.append(but)
        layout2.addWidget(but)
        QObject.connect(but, SIGNAL("clicked()"), but_clicked)

    layout.addWidget(frame)

    but = QPushButton("Clear Selection")
    layout.addWidget(but)
    QObject.connect(but, SIGNAL("clicked()"), tv.clearSelection)

    QObject.connect(tv, SIGNAL("clicked (QModelIndex)"),
        row_clicked)

    dialog.exec_()

    app.closeAllWindows()
Exemplo n.º 4
0
    tv = QTreeView(dialog)
    tv.setModel(model)
    tv.setAlternatingRowColors(True)
    layout.addWidget(tv)

    label = QLabel("Search for the following person")
    layout.addWidget(label)

    buts = []
    frame = QFrame(dialog)
    layout2 = QHBoxLayout(frame)

    for person in model.people:
        but = QPushButton(person.fname, frame)
        buts.append(but)
        layout2.addWidget(but)
        QObject.connect(but, SIGNAL("clicked()"), but_clicked)

    layout.addWidget(frame)

    but = QPushButton("Clear Selection")
    layout.addWidget(but)
    QObject.connect(but, SIGNAL("clicked()"), tv.clearSelection)

    QObject.connect(tv, SIGNAL("clicked (QModelIndex)"), row_clicked)

    dialog.exec_()

    app.closeAllWindows()
Exemplo n.º 5
0
 def finishWork(self):
     self.logger.info('Jaime termina su funcionamiento')                    
     QApplication.closeAllWindows()
Exemplo n.º 6
0
def quit_handler(signum, frame):
    """
    Handler for the SIGINT signal.
    """
    QApplication.closeAllWindows()
    sys.exit()