Le 01/06/2020 à 11:16, David Francis a écrit :
Hi, I am new to programming but have managed to design a GUI interface for my project. I would now like to have a graph on my GUI but when I add one it takes over the whole window... is there a way of imbedding a graph into a text box??
1. A text box is a text box. I wouldn't recommend embedding whatever into it.
2. "takes over the whole window" ?? Did you read the docs concerning PlotWidget etc.?
3. Did you launch pyqtgraph.examples.run(),
and thoroughly look the sources? You will see there some embedding
examples
4. Google is not your foe!
https://www.learnpyqt.com/courses/qt-creator/embed-pyqtgraph-custom-widgets-qt-app/
https://stackoverflow.com/questions/45872255/embed-a-pyqtgraph-plot-into-a-qt-ui
==
Sorry for being nasty, but if you are a beginner, and instead of doing some work you immediately cry "help!", you will remain a beginner forever.
Jerzy Karczmarczuk
/Caen, France/
--
You received this message because you are subscribed to the Google Groups "pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/3300ca3d-a082-a1d8-14d6-ee22bfde86ee%40gmail.com.
Thanks for the information, I obviously have tried google and been trolling the internet for the last 3 weeks trying to sort this but to no avail....
But thanks for responding to my question
Regards Dave
Hi, I am new to programming but have managed to design a GUI interface for my project. I would now like to have a graph on my GUI but when I add one it takes over the whole window... is there a way of imbedding a graph into a text box??
--
You received this message because you are subscribed to the Google Groups "pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/b13c737a-c6e5-4de4-970b-53614337c9a1%40googlegroups.com.
************************************************ Erik Johansson Project Manager, Wavefront Correction System National Solar Observatory Daniel K Inouye Solar Telescope 3665 Discovery Drive, Boulder, CO 80303 Tel: 303-735-7723 ************************************************
Hi David,I have done a lot of work embedding images, plots and charts into PyQt5 applications. Please describe a bit more what you are trying to accomplish and I'll see if I can get you pointed in the right direction. I'm pretty maxed out with work, so it may be a few days before I get back to you.Regards,
Erik
On Mon, Jun 1, 2020 at 3:16 AM David Francis <difra...@gmail.com> wrote:
Hi, I am new to programming but have managed to design a GUI interface for my project. I would now like to have a graph on my GUI but when I add one it takes over the whole window... is there a way of imbedding a graph into a text box??
--
You received this message because you are subscribed to the Google Groups "pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyqt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/b13c737a-c6e5-4de4-970b-53614337c9a1%40googlegroups.com.
Thanks you for your offer, I am going to have a go myself and see if I can sort it, if not I may give you a shout...
Thanks again
Dave
Thanks for your input I will give it a try.
Many thanks Dave
def add_plot(widget):
"""Add a plot item (that will behave nicely) to a basic QWidget (e.g.
generated by QTDesigner).
widget: QWidget
returns None
"""
layout = QtGui.QHBoxLayout()
widget.setLayout(layout)
layout.setSpacing(0)
widget.plotView = pg.GraphicsView()
layout.addWidget(widget.plotView)
widget.plotItem = pg.PlotItem()
widget.plotItem.resize = widget.resize
widget.plotView.setCentralItem(widget.plotItem)