prototype.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:SiebenApp 作者: ahitrin 项目源码 文件源码
def main():
    app = QApplication(sys.argv)
    w = QMainWindow()
    central_widget = CentralWidget()
    my_widgets = [
        (GoalWidget('one', '5'), 1, 1),
        (GoalWidget('two', '2'), 1, 2),
        (GoalWidget('An example of goal\nwith a long name', '3'), 2, 2),
        (GoalWidget('four', '1'), 2, 3),
        (GoalWidget('five', '4'), 3, 2),
    ]
    my_lines = [
        (0, 2), (1, 2),
        (2, 4), (3, 4),
    ]
    for widget, row, column in my_widgets:
        central_widget.addCustomWidget(widget, row, column)
    for upper, lower in my_lines:
        central_widget.addCustomLine(upper, lower)
    w.setCentralWidget(central_widget)
    w.show()
    sys.exit(app.exec_())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号