Results 1 to 5 of 5

Thread: Variable'QPrinter printer' has intializer but incomplete type

  1. #1
    Join Date
    Dec 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Symbian S60

    Lightbulb Variable'QPrinter printer' has intializer but incomplete type

    hi friends,

    I am new to QT+Symbian, I want to extract the QtWebToolKitWebPage in .pdf format.
    I tried some code, but facing some error. like:

    1).Variable'QPrinter printer' has intializer but incomplete type.
    2).Incomplete Type 'QPrinter"used in nested name specifier.


    Source Code.cpp

    QPrinter printer(QPrinter::HighResolution);
    printer.setFullPage(TRUE);
    printer.setOutputFormat(QPrinter::PdfFormat);
    printer.setOrientation(QPrinter::Landscape);
    printer.setOutputFileName("C://out.pdf");


    Header :-

    enum PrinterMode {ScreenResolution,PrinterResolution,HighResolution };
    // QPrinter *printer(QPrinter::HighResolution);
    QPrinter printer(PrinterMode PrintMode);

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Variable'QPrinter printer' has intializer but incomplete type

    Did you #include <QPrinter>?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Dec 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Symbian S60

    Default Re: Variable'QPrinter printer' has intializer but incomplete type

    Yes,i have included already

  4. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Variable'QPrinter printer' has intializer but incomplete type

    Ehm, is the "Header :-" your own? Because if so, you don't have to declare PrinterMode and QPrinter printer(...);

  5. #5
    Join Date
    Dec 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Symbian S60

    Default Re: Variable'QPrinter printer' has intializer but incomplete type

    After Commented the declaration of

    enum PrinterMode {ScreenResolution,PrinterResolution,HighResolution };
    // QPrinter *printer(QPrinter::HighResolution);
    QPrinter printer(PrinterMode PrintMode);


    I am facing the same problem. should i send the full code .

Similar Threads

  1. incomplete type?
    By T0bi4s in forum General Programming
    Replies: 6
    Last Post: 11th February 2019, 07:02
  2. how to send printer commands using QPrinter?
    By cutie.monkey in forum Qt Programming
    Replies: 1
    Last Post: 23rd April 2010, 09:19
  3. Replies: 1
    Last Post: 4th September 2008, 14:55
  4. QApplication::desktop() incomplete type
    By codebehind in forum Newbie
    Replies: 7
    Last Post: 21st August 2008, 19:08
  5. printer the chinese character with QPrinter
    By trytoremeber963 in forum Qt Programming
    Replies: 0
    Last Post: 3rd June 2008, 08:42

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.