Results 1 to 2 of 2

Thread: how to get painter for QwtScaleDraw function?

  1. #1
    Join Date
    Sep 2011
    Posts
    30
    Thanks
    6
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default how to get painter for QwtScaleDraw function?

    I derived a class from QwtScaleDraw and add a function to draw the scale in real time, but the function can't use QPainter *painter to draw the scale due to it only can be used with paintevent. how can i draw the scale same as QwtPlot's QwtPlotDriectPainter method in real time? thanks.

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

    Default Re: how to get painter for QwtScaleDraw function?

    Read the code of QwtPlotDirectPainter and do the same in your code,

    Uwe

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

    josentop (14th October 2011)

Similar Threads

  1. Replies: 2
    Last Post: 14th September 2011, 07:53
  2. Replies: 0
    Last Post: 23rd February 2011, 00:07
  3. QwtScaleDraw align label to xaxis
    By kja in forum Qwt
    Replies: 1
    Last Post: 21st November 2010, 19:55
  4. Replies: 1
    Last Post: 14th October 2010, 18:56
  5. painter's drawPie() function how to draw few sensible PIEZ..
    By salmanmanekia in forum Qt Programming
    Replies: 15
    Last Post: 31st August 2008, 16:52

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.