I tried this:
QPrintDialog printdia(MyWevView);
printdia.exec();
QPrinter* printer = printdia.printer();
QPainter painter(printer);
MyWevView->render(&painter, MyWevView->pos(),MyWevView->visibleRegion());
I know I don't check if the user accepts but that's not the problem...everytime, I don't see the dialog, it just prints
so first I don't understand why the QPrintDialog doesn't appear and second why it knows my printer and go directly prints the text
I guess fixing my first problem will solve my second...
thanks!
The following is a complete working example of printing with
QWebView
,QPrintDialog
works fine:win.h
win.cpp
test.cpp
test.pro