Results 1 to 3 of 3

Thread: Compile error in qwt_polar_renderer.cpp when QT_NO_PRINTER is defined

  1. #1
    Join Date
    Oct 2017
    Posts
    25
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Compile error in qwt_polar_renderer.cpp when QT_NO_PRINTER is defined

    I was able to successfully configure, build and install Qwt for x86 and CE6 (cross-compilation) based on Qt 4.8.4.
    To cross compile for CE6 I must define QT_NO_PRINTER macro (maybe QPrinter is not supported in CE6 - I don't know).
    I was able to successfully configure, build and install QwtPolar for x86 too.

    When I try to cross-compile QwtPolar for CE6 I must define QT_NO_PRINTER macro but this gives compile error in qwt_polar_renderer.cpp.
    .\qwt_polar_renderer.cpp(231) : error C2027: use of undefined type 'QPrinter'
    I see that some portion of the code in this file is conditionally excluded based on QT_NO_PRINTER macro.
    But QwtPolarRenderer::renderTo() expected a QPainter inpt parameter in any case.

    How can I fix this, please?

  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: Compile error in qwt_polar_renderer.cpp when QT_NO_PRINTER is defined

    Qt Code:
    1. #ifndef QT_NO_PRINTER
    2.  
    3. void QwtPolarRenderer::renderTo(
    4. QwtPolarPlot *plot, QPrinter &printer ) const
    5. {
    6. ...
    7. }
    8.  
    9. #endif
    To copy to clipboard, switch view to plain text mode 

    This function does not make any sense, when you have no printer support. Please also file a bug report.

    ciao,
    Uwe

  3. #3
    Join Date
    Oct 2017
    Posts
    25
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: Compile error in qwt_polar_renderer.cpp when QT_NO_PRINTER is defined

    Thank you very much.

    Quote Originally Posted by Uwe View Post
    This function does not make any sense, when you have no printer support. Please also file a bug report.
    Do you mean here?

    I think that this fix impacts into polardemo example (
    Qt Code:
    1. MainWindow::printDocument()
    To copy to clipboard, switch view to plain text mode 
    in mainwindow.cpp instantiates a QPrinter variable)

Similar Threads

  1. Qt 5 compile for WinCE 6.0, with VS 2008. IFailDialog not defined.
    By MwilsRetro in forum Installation and Deployment
    Replies: 1
    Last Post: 18th September 2015, 15:43
  2. Reference Error: google is not defined
    By pkarthick in forum Qt Programming
    Replies: 1
    Last Post: 6th March 2011, 10:31
  3. Replies: 3
    Last Post: 15th November 2010, 08:53
  4. QT_NO_PRINTER doesn't have effect
    By vcp in forum Qt Programming
    Replies: 2
    Last Post: 12th February 2010, 14:03
  5. Error::defined after prior declaration as dllimport:
    By hasnatzaidi in forum Qt Programming
    Replies: 2
    Last Post: 12th June 2009, 02:37

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.