Hi, I would like to add to my Qt creator Application
http://casolaredercole.it/mobile/crono2.zip
the GPS widget like in this image
http://www.casolaredercole.it/mobile/displaydd.jpg
Help me please
Hi, I would like to add to my Qt creator Application
http://casolaredercole.it/mobile/crono2.zip
the GPS widget like in this image
http://www.casolaredercole.it/mobile/displaydd.jpg
Help me please
i don't know how to start/beginner
See "creating custom widgets" starting on page 5 of "C++ GUI programming with Qt4, second edition". I'm sure you can get it somewhere. Or do some google searches on "qt custom widget".
Creating a custom widget is not so difficult, but is not something we can/will just tell you in this thread.
One advice : don't start to try to integrate your widget in Qt Designer. That is quite more complex. If it's just for a single application, you can just promote a widget on your form to the new class you create.
Best regards,
Marc
I don't understand exactly what you mean. Do you mean the 5 bar thing in the top-left corner?
If so, just create a custom widget derived from QWidget, add signals and slots called setValue(int) and value(int) or something like that to set the number of bars shown, and reimplement the paint() method to draw the bars based on the value.
See the documentation for the QWidget::paintEvent() method and the QPainter class.
Last edited by MTK358; 15th September 2010 at 02:03.
I'm sorry but I have need of the code because I do not know in order to write it... i'm incapable
You should learn the basics of C++ and Qt (specifically, how to use signals and slots) first, then. Once you know that, it should be quite simple.
I have 1 day of time in order to make it help me please
OK. First, do you know how to define your own signals and slots?
http://doc.trolltech.com/4.6/signalsandslots.html
for the time being a any signal goes well or generic slots.
is it possible to add this widget in this code?
http://casolaredercole.it/mobile/crono2.zip
http://www.casolaredercole.it/mobile/displaydd.jpg
I don't understand.
they are interested to graphically visualize 4 vertical lines with under written GPS like in this image
http://www.casolaredercole.it/mobile/displaydd.jpg ,
for the time being I do not know the sign that I will receive
Bookmarks