【问题标题】:Embedding PyQtGraph in Qt without generating new Window在 Qt 中嵌入 PyQtGraph 而不生成新窗口
【发布时间】:2013-07-29 07:12:18
【问题描述】:

我不知道如何在不生成新窗口的情况下将 PyQtGraph 嵌入到我的 MainWindow 中,就像使用它完成的那样

pg.plot(...)

最简单的方法是什么?

【问题讨论】:

    标签: python python-2.7 pyqt pyqt4 pyqtgraph


    【解决方案1】:

    Pyqtgraph 提供了一个可以嵌入的long list of widgetsdocumentation for pg.plot() 声明此函数创建并显示PlotWidget,因此这可能就是您想要的。

    例子:

    my_plot = pg.PlotWidget()
    my_layout.addWidget(my_plot)
    my_plot.plot(x, y)
    

    【讨论】:

    • @dan_0 如果对您提出的问题有效,您需要接受正确的答案!
    猜你喜欢
    • 2020-07-17
    • 1970-01-01
    • 2012-10-25
    • 2020-08-16
    • 2019-11-30
    • 1970-01-01
    • 2013-04-10
    • 1970-01-01
    相关资源
    最近更新 更多