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);
Re: Variable'QPrinter printer' has intializer but incomplete type
Did you #include <QPrinter>?
Re: Variable'QPrinter printer' has intializer but incomplete type
Yes,i have included already
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(...);
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 .