[Qt] Printing with WebKit
aime two
aime2nice at oqvrai.net
Thu Sep 24 19:06:31 CEST 2009
Hi
Thx,
I test that immediatly, and I say what.
Den Jean a écrit :
> On Friday 18 September 2009 16:52:09 aime two wrote:
>
>> Is someone has an idea about my problem when I try print with Qwebview
>> on Windows?
>>
> I tested on windows and linux and it just works.
>
> test code (lacks some *_destroys, just for testing purposes)
>
> try
> PrnInfo:=QPrinterInfo_Create;
> QPrinterInfo_DefaultPrinter(PrnInfo);
>
> if QPrinterInfo_isNull(PrnInfo) then
> begin
> writeln('no printer found');
> exit;
> end;
>
> Prn:=QPrinter_Create(PrnInfo);
> QPrinterInfo_printerName(PrnInfo, at w);
> writeln('Default Printer Name:',w);
> PrintDlg:=QPrintDialog_create(Prn);
> QPrintDialog_exec(PrintDlg);
> QPrinter_printerName(QAbstractPrintDialog_printer(PrintDlg), at w);
> writeln('Chosen Printer Name:',w);
>
> QWebView_print(ActiveTab.WebView,QAbstractPrintDialog_printer(PrintDlg));
>
> except on E:Exception do
> writeln('Exception occurred in FilePrint:',E.Message);
> end;
>
> _______________________________________________
> Qt mailing list
> Qt at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/qt
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/qt/attachments/20090924/0639bbca/attachment-0002.html>
More information about the Qt
mailing list