Exemplo n.º 1
0
def test():
    from qt.core import QMainWindow
    app = QApplication([])
    w = QMainWindow()
    cf = CoverFlow()
    w.resize(cf.size()+QSize(30, 20))
    model = DummyImageList()
    cf.setImages(model)
    cf.setCurrentSlide(39000)
    w.setCentralWidget(cf)

    w.show()
    cf.setFocus(Qt.FocusReason.OtherFocusReason)
    sys.exit(app.exec())
Exemplo n.º 2
0
    w.resize(cf.size()+QSize(30, 20))
    model = DummyImageList()
    cf.setImages(model)
    cf.setCurrentSlide(39000)
    w.setCentralWidget(cf)

    w.show()
    cf.setFocus(Qt.FocusReason.OtherFocusReason)
    sys.exit(app.exec())


def main(args=sys.argv):
    return 0


if __name__ == '__main__':
    from qt.core import QMainWindow
    app = QApplication([])
    w = QMainWindow()
    cf = CoverFlow()
    w.resize(cf.size()+QSize(30, 20))
    path = sys.argv[1]
    model = FileSystemImages(sys.argv[1])
    cf.currentChanged[int].connect(model.currentChanged)
    cf.setImages(model)
    w.setCentralWidget(cf)

    w.show()
    cf.setFocus(Qt.FocusReason.OtherFocusReason)
    sys.exit(app.exec())