def main():
    app = QtWidgets.QApplication(sys.argv)
    win = QtWidgets.QWidget()
    l = QtWidgets.QVBoxLayout()
    win.setLayout(l)

    w = QtWidgets.QDateEdit()
    w.setCalendarPopup(True)
    l.addWidget(w)
    l.addWidget(QNDateEdit())
    l.addWidget(QNDateEdit(n=6))
    l.addWidget(QNDateEdit(n=1))
    l.addWidget(QNDateEdit(n=2))
    l.addWidget(QNDateEdit(n=6, columns=2))
    l.addWidget(QNDateEdit(n=6, columns=4))
    l.addWidget(QNDateEdit(n=12, columns=4))
    l.addWidget(QNDateEdit(columns=1))
    last = QNDateEdit()
    l.addWidget(last)
    last.calendarWidget().build(5, 4)

    win.show()

    if isQt6:
        sys.exit(app.exec())
    else:
        sys.exit(app.exec_())
Example #2
0
def main():
    # stupid test
    a = QtWidgets.QApplication([])
    b = QtWidgets.QPushButton("Say hello", None)
    g.procs.add(['ls', '/tmp'])
    g.procs.add(['ls', '-la'])
    #a.setMainWidget(b)
    b.show()
    a.exec_()
def main():
    global gApp
    gApp = QtWidgets.QApplication(sys.argv)
    args = get_args()
    ok = RemoveDuplicates().run(**args)
    if ok:
        if isQt5:
            sys.exit(gApp.exec_())
        else:
            sys.exit(gApp.exec())
Example #4
0
                    return c, p.copy()
        g.es_print("Not in gnx cache, slow!")
        for c, p in self.all_positions_global():
            if p.gnx == gnx:
                return c, p.copy()
        return None, None

    #@+node:ekr.20140920041848.17935: *3* update_new_cs
    def update_new_cs(self):

        for c in g.app.commanders():
            if c.hash() not in self.cs:
                for p in c.all_unique_positions():
                    k = p.gnx
                    self.ps[k] = c, p.v
                self.cs.add(c.hash())

    #@-others


#@-others

if __name__ == '__main__':
    app = QtWidgets.QApplication(sys.argv)
    bd = GlobalSearch()
    sys.exit(app.exec_())

#@@language python
#@@tabwidth -4
#@-leo