Draw a graphic in qt designer
-
Hi, I should draw a graphic in qt designer about a real time process. This graphic represent PID Control. What tools or widgets I should use? Thanks
-
Hi jekasores!
Can you explain what you mean by "...draw a graphic in qt designer..."? -
Since a PID contains three parameters I would recommend three sliders/dials or spinbox. But as qxoz said, it's a bit unclear what you want to achieve. Do you want a real-time graph? Or a way to setup the PID settings real-time? Or both?
Drawing a graph there are some third party tools to use.
For the dials or other widgets you should use the signals changed() to send new settings into your system.
Greetz -
Sorry guys,
I would like to say that I want to draw a graphic in Cartesian coordinate axis. The graphic will show velocity in my process so every time I need to draw a new point in the graphic. Which tools is better to use? What commands I should search for? -
The class you should search for is QPainter (and everything related to it)...
Have a look at the "Basic drawing example":http://qt-project.org/doc/qt-4.8/painting-basicdrawing.html this will show you how to use QPainter -
Also you can get good performance with "Graphicsview":https://qt-project.org/doc/qt-5.0/qtwidgets/examples-graphicsview.html
-
Thanks guys! I'll try it. Thanks!