Results 1 to 8 of 8

Thread: My own scale widget in Qwt

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #7
    Join Date
    May 2006
    Location
    Bangalore
    Posts
    23
    Thanks
    3
    Thanked 4 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: My own scale widget in Qwt

    I agree with UVE, in that you have to use QwtPlot::setAxisScaleDiv() to be able to have variable distances between your labels on your scale. For that you need to have some sort of calculation of knowing what your scale would look like at any given instance.

    Now displaying label part should be easy.
    If you want to display your own labels, you can subclass QwtScaleDraw and reimplement label (double).
    Obviously, you will have to tell your QwtPlot about your new QwtScaleDraw implementation by using QwtPlot::setAxisScaleDraw().

    Inside label(), you can even have a mapping of the 'double' argument with your label strings.

  2. The following user says thank you to bits for this useful post:

    igrms (15th June 2006)

Similar Threads

  1. Replies: 4
    Last Post: 24th March 2006, 22:50
  2. Forwarding mouse events to another widget.
    By yogeshm02 in forum Qt Programming
    Replies: 8
    Last Post: 28th February 2006, 13:25
  3. [Qt 4.1.0] Split a widget on demand
    By Townk in forum Qt Programming
    Replies: 3
    Last Post: 17th February 2006, 14:16
  4. advanced split widget
    By vitaly in forum Qt Programming
    Replies: 10
    Last Post: 24th January 2006, 20:00
  5. use interesting QWT Library with QT3.X
    By raphaelf in forum Qwt
    Replies: 2
    Last Post: 23rd January 2006, 11:24

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.