Results 1 to 8 of 8

Thread: Qwt Plot Grid and Plot Background problem when updating qwt 5.2.3 to 6.1.6

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,326
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanked 880 Times in 828 Posts

    Default Re: Qwt Plot Grid and Plot Background problem when updating qwt 5.2.3 to 6.1.6

    Your draw methods are not overriding - they have a QRect while QwtPlotItem::draw has a QRectF in the signature.
    Using the C++11 override keyword would have told you.

    HTH,
    Uwe

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

    olredi (9th April 2021)

  3. #2
    Join Date
    Apr 2021
    Posts
    7
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Windows
    Thanks
    2

    Default Re: Qwt Plot Grid and Plot Background problem when updating qwt 5.2.3 to 6.1.6

    Thanks a lot. That solves my problem.

    Using the C++11 override keyword would have told you.
    Did not see anything regarding override.

    Thanks,
    olredi

  4. #3
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,349
    Qt products
    Qt5
    Platforms
    Windows
    Thanks
    318
    Thanked 872 Times in 859 Posts

    Default Re: Qwt Plot Grid and Plot Background problem when updating qwt 5.2.3 to 6.1.6

    Did not see anything regarding override.
    "override" is a new keyword starting in C++11. You place it at the end of the declaration of a virtual class method that you are overriding. If you make a mistake in the declaration (QRect instead of QRectF for example) the compiler will issue an error because the signature is wrong.

    Qt Code:
    1. void draw(QPainter *painter, const QwtScaleMap &, const QwtScaleMap &, const QRect &rect) const override;
    To copy to clipboard, switch view to plain text mode 
    would cause a compile error with Qwt 6.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

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

    olredi (9th April 2021)

Similar Threads

  1. Plot above/below grid
    By link19 in forum Qwt
    Replies: 1
    Last Post: 3rd September 2019, 16:31
  2. How to force plot grid to follow top axis?
    By Sintegrial in forum Qwt
    Replies: 5
    Last Post: 13th November 2015, 10:13
  3. Replies: 13
    Last Post: 20th September 2011, 09:50
  4. sync plot grid w/ external scale widget
    By Kevin Ching in forum Qwt
    Replies: 6
    Last Post: 30th September 2010, 17:12
  5. Qwt plot + grid huge pdf file
    By giusepped in forum Qwt
    Replies: 3
    Last Post: 17th December 2008, 13:53

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.