コード例 #1
0
def make():
    demo = QMainWindow()
    toolBar = QToolBar(demo)
    toolBar.addAction(QWhatsThis.createAction(toolBar))
    demo.addToolBar(toolBar)
    plot = Plot(demo)
    demo.setCentralWidget(plot)
    plot.setWhatsThis(
        'An useless plot to demonstrate how to use event filtering.\n\n'
        'You can click on the color bar, the scales or move the slider.\n'
        'All points can be moved using the mouse or the keyboard.')
    CanvasPicker(plot)
    scalePicker = ScalePicker(plot)
    scalePicker.clicked.connect(plot.insertCurve)
    demo.resize(540, 400)
    demo.show()
    return demo
コード例 #2
0
def make():
    demo = QMainWindow()
    toolBar = QToolBar(demo)
    toolBar.addAction(QWhatsThis.createAction(toolBar))
    demo.addToolBar(toolBar)
    plot = Plot(demo)
    demo.setCentralWidget(plot)
    plot.setWhatsThis(
        "An useless plot to demonstrate how to use event filtering.\n\n"
        "You can click on the color bar, the scales or move the slider.\n"
        "All points can be moved using the mouse or the keyboard."
    )
    CanvasPicker(plot)
    scalePicker = ScalePicker(plot)
    scalePicker.SIG_CLICKED.connect(plot.insertCurve)
    demo.resize(540, 400)
    demo.show()
    return demo