Looks like the SIGNAL loadFinished(bool) is not emitted anymore with Qt 6.8.1
-
wrote on 18 Jan 2025, 21:43 last edited by
That line is already included.
See timetableprintform.cpp line 42.
And it is only working with Qt 6.7.2. Not with Qt 6.8.1. -
wrote on 18 Jan 2025, 21:51 last edited by
It's a bit funny that it work in that line you added.
But i can't write it there, since in the real application is a big dialog where you can select of different settings and timetables.
So I can't call it from there.
I must call it from line 42 and there it is not working anymore. -
wrote on 18 Jan 2025, 21:53 last edited by Volker75
So the bug is, that this line doesn't work anymore. But why? I need a connect. I can't call it in the constructor like you done it.
connect(pbPrintPreviewFull, SIGNAL(clicked()), this, SLOT(printPre
You must of course press on preview button!
-
wrote on 18 Jan 2025, 22:21 last edited by Volker75
BTW: I don't get the "The cached device pixel ratio value was stale on window update. Please file a QTBUG which explains how to reproduce." information. Are you using Windows, Linux or MacOS?
I am currently trying Linux only and Linux doesn't work anymore :-( -
wrote on 18 Jan 2025, 22:28 last edited by
Ah... Sorry. Reading your mail once again.
Yes, then also the preview button is working. Strange. But the solution doesn't work, since there is a big white preview first and i can't hide it. And after printpreview at should also close, but it stays in the window. So that is not useable. It should work as with Qt 6.7.2. -
wrote on 19 Jan 2025, 00:21 last edited by
Hi, the reason the behavior differs between Qt 6.7.2 and Qt 6.8.1 is probably because you're creating the QWebEngineView with your QDialog derived TimetablePrintForm, i.e. not a QWdiget.
Easiest solution is just to omit any parent, like this:
,,, viewPreview2 = new QWebEngineView(); //notVisible. But must stay alive for printing. viewPreview2->hide(); ...
It was probably just good luck that allowed a QDialog flavoed parent to work anyway in 6.7.2 but in 6.8.1 you run out of it :-)
-
wrote on 19 Jan 2025, 02:30 last edited by
I fear I don't understand it 100%, but it is working now!
Thank you so much!
You have earned my announce reward. Please tell me your PayPal (email) or IBAN here or write me a private message and I will sent you the money..
Can you also tell if I need to care about deleting it now myself?
So do I need to write somewhere "delete viewPreview2" myself now or does the garbage collector already cares about it? -
wrote on 19 Jan 2025, 02:42 last edited by
Re. the delete: easiest is to do that in TimetablePrintForm's destructor:
... TimetablePrintForm::~TimetablePrintForm(){ delete viewPreview2; } ...
(in C++ you have to take out the garbage yourself, no GC available)
-
-
wrote on 19 Jan 2025, 02:47 last edited by
Thank you! I guess the other bug that I wrote some time ago and wrote a link here is because of the same bug. I well mark the other topic from me as solved as soon as I am able the check that also. Thank you!
-
wrote on 19 Jan 2025, 08:32 last edited by Volker75
Last question:
I saw in the documentation, that QWebEngineView() has also a close().
Should I close() before delete? (Or only close() and not delete, but I guess that is wrong) -
wrote on 19 Jan 2025, 13:40 last edited by
Since your QWebEngineView is hidden anyway (which is essentially what close() does), I don't think a close() is needed, i.e. the delete will suffice.
-
wrote on 19 Jan 2025, 13:56 last edited by
Thank you!
65/67