In QtDesigner, I dragged a generic Widget (called it "graphWidget"), then promoted it from its baseclass of QWidget to my own class "PlotWidget". I then can load it via: from pyqtgraph import PlotWidget, plot ... class MainWindow(QtWidgets.QMainWindow): self.mainbox = uic.loadUi('mainwindow.ui', self) self.plot([1,2,3,4,5,6,7,8,9,10], [30,32,34,32,33,31,29,32,35,45]) But, how would you add a button or label to the central widget's layout? self.label = QtWidgets.QLabel() For example, none of these work: self.mainbox.addWidget(self.label) self.mainbox.graphWidget().addWidget(self.label) self.mainbox.layout().addWidget(self.label) Do I need to create a new layout using setCentralWidget or setLayout? vLayout = QVBoxLayout () vLayout.addWidget( loadUi( 'mainwindow.ui' ) )
Hi! The 'mainwindow.ui' file can be edited in designer. There you can add the buttons or layouts. Please save the changes in designer and then it will appear through the loadUi.
Hy my name is Yash I want to add something in this gui. That i want to select some part of a wave form and then plot the waveform frequency vs amplitude graph.... (Which is open in different window) How can i do that.. And second thing is how I change the real time plot to Amplitude vs frequency. .. Please help me out... 🙏 please If possible please make a video on this also.... Please
Hello, My name is Novita. Thanks to you for share your project video, this is help me to understand about GUI on python. But, i need your help. I have a project to build a GUI python real-time with raspi to monitoring thermocycler on PCR. I hope you can help me. After that, thank you
Thank you very much for the explanation!!
great tutorial. how if we want to add spectrogram plot in realtime?
In QtDesigner, I dragged a generic Widget (called it "graphWidget"), then promoted it from its baseclass of QWidget to my own class "PlotWidget". I then can load it via:
from pyqtgraph import PlotWidget, plot
...
class MainWindow(QtWidgets.QMainWindow):
self.mainbox = uic.loadUi('mainwindow.ui', self)
self.plot([1,2,3,4,5,6,7,8,9,10], [30,32,34,32,33,31,29,32,35,45])
But, how would you add a button or label to the central widget's layout?
self.label = QtWidgets.QLabel()
For example, none of these work:
self.mainbox.addWidget(self.label)
self.mainbox.graphWidget().addWidget(self.label)
self.mainbox.layout().addWidget(self.label)
Do I need to create a new layout using setCentralWidget or setLayout?
vLayout = QVBoxLayout ()
vLayout.addWidget( loadUi( 'mainwindow.ui' ) )
Hi! The 'mainwindow.ui' file can be edited in designer. There you can add the buttons or layouts. Please save the changes in designer and then it will appear through the loadUi.
Hy my name is Yash
I want to add something in this gui.
That i want to select some part of a wave form and then plot the waveform frequency vs amplitude graph.... (Which is open in different window)
How can i do that..
And second thing is how I change the real time plot to Amplitude vs frequency. ..
Please help me out... 🙏 please
If possible please make a video on this also.... Please
Thanks for the suggestion
please suggest me
I understand the code.
but how to plot amplitude vs frequency and amplitude vs time of live audio please please please help me
@@pyshine_official PLEASE HELP ME PLEASE please
@@yashsoni9339 Hi, for that N point FFT is required and then the xaxis would contain frequency points and y axis will have the magnitude.
Hello, My name is Novita. Thanks to you for share your project video, this is help me to understand about GUI on python.
But, i need your help.
I have a project to build a GUI python real-time with raspi to monitoring thermocycler on PCR.
I hope you can help me.
After that, thank you