Importing a pyqtgraph module to a PyQt5 project

38 views
Skip to first unread message

degrou...@gmail.com

unread,
Aug 22, 2017, 11:22:48 PM8/22/17
to pyqtgraph
I am trying to import one of the pyqtgraph Example modules. I call this module
plot.py


I want to show the plot when a button is clicked. I am very new to PyQt, so I am probably not going about this the right way.

Here is what I did:

self.pushButton.clicked.connect(self.barPlot)



def barPlot(self):

   
import plot


This works as expected, the plot shows in a pop up window when the button is clicked.

But, when I close the window with the plot and click on the button the second time, to show the plot again, nothing happens.
I have some ideas why this is happening, but I don't know enough about PyQt yet to solve this problem.

Any help will be greatly appreciated.

Thanks.

Cheers,

Joe
Reply all
Reply to author
Forward
0 new messages