Results 1 to 20 of 40

Thread: Widget GPS

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2010
    Posts
    19
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Widget GPS

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Widget GPS

    And what is keeping you from doing that?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Sep 2010
    Posts
    19
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Widget GPS

    i don't know how to start/beginner

  4. #4
    Join Date
    Aug 2009
    Location
    Belgium
    Posts
    310
    Thanks
    10
    Thanked 31 Times in 25 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Widget GPS

    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

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Widget GPS

    Quote Originally Posted by marcvanriet View Post
    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".
    I would rather start with the Analog clock widget example.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #6
    Join Date
    Jun 2010
    Posts
    142
    Thanks
    11
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Widget GPS

    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.

  7. #7
    Join Date
    Sep 2010
    Posts
    19
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Widget GPS

    I'm sorry but I have need of the code because I do not know in order to write it... i'm incapable

  8. #8
    Join Date
    Jun 2010
    Posts
    142
    Thanks
    11
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Widget GPS

    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.

  9. #9
    Join Date
    Sep 2010
    Posts
    19
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Widget GPS

    I have 1 day of time in order to make it help me please

  10. #10
    Join Date
    Jun 2010
    Posts
    142
    Thanks
    11
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Widget GPS

    Quote Originally Posted by toro.86 View Post
    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

  11. #11
    Join Date
    Sep 2010
    Posts
    19
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Widget GPS

    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

  12. #12
    Join Date
    Jun 2010
    Posts
    142
    Thanks
    11
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Widget GPS

    I don't understand.

  13. #13
    Join Date
    Sep 2010
    Posts
    19
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Widget GPS

    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

  14. #14
    Join Date
    Jun 2010
    Posts
    142
    Thanks
    11
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Widget GPS

    Quote Originally Posted by toro.86 View Post
    for the time being I do not know the sign that I will receive
    What does that mean?

    Anyway, I'm working on an example.

  15. #15
    Join Date
    Sep 2010
    Posts
    19
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Widget GPS

    Quote Originally Posted by MTK358 View Post
    What does that mean?

    Anyway, I'm working on an example.
    one moment max 5 minute I sent you one private message

Similar Threads

  1. Replies: 10
    Last Post: 29th May 2010, 18:42
  2. Replies: 7
    Last Post: 14th January 2010, 08:47
  3. Replies: 4
    Last Post: 3rd March 2008, 22:15
  4. Replies: 3
    Last Post: 17th October 2007, 12:52
  5. Replies: 1
    Last Post: 5th November 2006, 23:50

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.