Namespaces
Variants
Actions
(Difference between revisions)

About using of QPrint and QPrintDialog

Jump to: navigation, search
m (Hamishwillee - Addition to article of: Category:MeeGo Category:Symbian. (Add platform categories))
m (Text replace - "Category:MeeGo" to "Category:MeeGo Harmattan")
Line 39: Line 39:
 
#endif
 
#endif
  
</code>[[Category:MeeGo]] [[Category:Symbian]]
+
</code>[[Category:MeeGo Harmattan]] [[Category:Symbian]]

Revision as of 13:51, 13 June 2012

Article Metadata

Tested with
Devices(s): Emulator / desktop / device

Compatibility
Platform(s): All Qt Supported

Article
Keywords: QPrint, QPrintDialog
Created: r60600 (28 Nov 2010)
Last edited: hamishwillee (13 Jun 2012)


Overview

The QPrinter class is responsible for printing in Qt. Like QPixmap or QImage, it is a QPaintDevice. There is also the QPrintDialog class, enabling a variety of settings to be made at the printer. Under Windows and Mac OS X the class shows the print dialog of the system; otherwise, it uses a separate dialog. The user can manipulate all the settings in the dialog. But user must keep in mind some basic information while using these classes in the code.


Tips

It is better to predefine QPrinter and QPrintDialog before using them inside the code or else compilation process will not be successful because of no printer support.

#ifndef QT_NO_PRINTER
 
...
 
QPrinter printer(QPrinter::HighResolution);
 
QPrintDialog dialog(&printer, this);
 
...
 
#endif
802 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved