Qt-interest Archive, March 2002
How to get status of "Selection" radio button in windows printerdialog
Message 1 in thread
- Subject: How to get status of "Selection" radio button in windows printerdialog
- From: Erik Hartmann <erik@xxxxxxxxx>
- Date: Tue, 26 Mar 2002 14:10:42 +0100
- Organization: DAISY
- To: qt-interest <qt-interest@xxxxxxxxxxxxx>
Hello!
I use the QPrinter class to print and all works fine.
But now I need to get the status of "Selection" radio button in windows printerdialog,
the only way I found is to reimplement the complete QPrinter class,
because the result of PrintDlg() is not stored, it is parsed direct to the private readPdlg().
This solution is ugly, because I need to maintain the trolltech code:-(
I hope there are better solutions.
Erik Hartmann
(I hope our trolls recieve this hint :-)
--
[ signature omitted ]
Message 2 in thread
Op dinsdag 26 maart 2002 14:10, schreef u:
> Hello!
Hi,
>
> I use the QPrinter class to print and all works fine.
>
> But now I need to get the status of "Selection" radio button in windows
> printerdialog, the only way I found is to reimplement the complete QPrinter
> class, because the result of PrintDlg() is not stored, it is parsed direct
> to the private readPdlg(). This solution is ugly, because I need to
> maintain the trolltech code:-(
>
> I hope there are better solutions.
>
> Erik Hartmann
>
> (I hope our trolls recieve this hint :-)
I wouldn't call this solution necessarily less evil but at least it's another
option, via a combination of the functions QObject::children and QObject::isA
(or QObject::inherits) you can retrieve pointers to the widgets in the
printdialog (the only advantage this method would give you is to avoid
subclassing, but it's not necessarily nicer code, it's quite ugly actually).
but I agree, the QPrinter should give the user more options concerning the
printdialog (i.e. the possibility to create our own printdialog, or a better
customizable printdialog)
regards,
Klaas