[Qt] Printing with WebKit

aime two aime2nice at oqvrai.net
Sat Sep 26 12:30:38 CEST 2009


Hi Den Jean,

I try with your code, but it dont work.
Can you add this print function in the project lclwebkit, try it on 
windows, and then put the new project on the net?

It's a good manier to ensure where is the problem for me.

(my english is very bad, I know. I hope you understand my message)

Regards,

Aime2Nice

(My nickname means "Aime of the city of "Nice", "Aime" is a name and 
"Nice" is a city of the French Riviera)


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/20090926/14e92a32/attachment-0002.html>


More information about the Qt mailing list