Results 1 to 5 of 5

Thread: Showing date-time value in QwtPlotPicker

  1. #1
    Join Date
    Jun 2011
    Location
    Porto Alegre, Brazil
    Posts
    482
    Thanks
    165
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Showing date-time value in QwtPlotPicker

    Hello!

    I want to use QwtPlotPicker so the user will be able to see the correspondent Y and X axis values each time he puts the mouse over the graph - such as in the bode example. The problem is that I'm using a date-time x coordinate, and then when I use the QwtPlotPicker it shows the correspondent double value of the date-time, not the date-time itself.

    qwt.jpg

    How can I make the QwtPlotPicker show the date-time value correspondent to the X axis?

    A secondary question also related to QwtPlotPicker is: how can I limit the decimals that is shown by it? In this app particularly, I want no decimals for the Y axis value.


    Thanks,

    Momergil

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,309
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Showing date-time value in QwtPlotPicker

    The same answer for both questions: see the stockchart example.

    Uwe

  3. #3
    Join Date
    Jun 2011
    Location
    Porto Alegre, Brazil
    Posts
    482
    Thanks
    165
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Showing date-time value in QwtPlotPicker

    Quote Originally Posted by Uwe View Post
    The same answer for both questions: see the stockchart example.

    Uwe
    Sorry Uwe, but are your sure about this? I went to the stockchart example and not only I found that it event doesn't implement QwtPlotPicker, but also the closest thing it has to it, which is a particular implementation of QwtPlotZoomer, also has the same problem I want to correct:

    question qwt.jpg

    If you're sure that the answer is there, could you please be a little bit more specific where? Cause I can't see it. :T


    Momergil

  4. #4
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,309
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Showing date-time value in QwtPlotPicker

    QwtPlotZoomer is derived from QwtPlotPicker so you have to the same for both.
    And I forgot - the code has been changed late. If it is not in rc3 you have to check SVN trunk.

    Uwe

  5. The following user says thank you to Uwe for this useful post:

    Momergil (22nd March 2013)

  6. #5
    Join Date
    Jun 2011
    Location
    Porto Alegre, Brazil
    Posts
    482
    Thanks
    165
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Showing date-time value in QwtPlotPicker

    Quote Originally Posted by Uwe View Post
    QwtPlotZoomer is derived from QwtPlotPicker so you have to the same for both.
    And I forgot - the code has been changed late. If it is not in rc3 you have to check SVN trunk.

    Uwe
    Well, I thought it would be better to simply install rc3 What I found interesting, thought, is that after recompiling my working code, the software crashed each time it passed by QwtPlot->replot(). Since my code don't actually need it, no problem; I just found myself in a bad position regarding updating Qwt to rc3 for a project at home, where replot() is used all the time.


    Thanks!

    Momergil

Similar Threads

  1. Date Time
    By javed_alam786 in forum Qt Programming
    Replies: 2
    Last Post: 11th May 2011, 15:52
  2. Replies: 1
    Last Post: 4th November 2010, 08:00
  3. other time...can't get date
    By mmm286 in forum Newbie
    Replies: 7
    Last Post: 4th March 2010, 16:53
  4. Date Time
    By starcontrol in forum Qt Programming
    Replies: 3
    Last Post: 4th April 2008, 12:02

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.