PDA

View Full Version : QPrintDialog pre initialisation?



conti
25th May 2012, 09:20
Hi im using a QPrintDialog to let the User choose the printer which he wants to use. My problem is that the list showing the available printers starts up emtpy. I have to use the context menu -> add printer in the printer list to add the network printer every time i use the application. I know that QPrintDialog starts a native os printer dialog but is there anyway to make something like a pre initialisation to fill the printer list before showing? (Windows vista)

Edit:
I use

pr = new QPrinter(QPrinterInfo::defaultPrinter(),QPrinter:: HighResolution);
pr->setCreator("Testing");
pr->setDocName(view->windowTitle());
QPrintDialog printDialog(pr, this);

to create the Printer and the QPrintDialog. The defaultPrinter().printerName() is the correct system default print, but still the QPrinterDialog printer list starts with a empty list.