Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Looks like the SIGNAL loadFinished(bool) is not emitted anymore with Qt 6.8.1
Forum Updated to NodeBB v4.3 + New Features

Looks like the SIGNAL loadFinished(bool) is not emitted anymore with Qt 6.8.1

Scheduled Pinned Locked Moved Solved General and Desktop
67 Posts 5 Posters 13.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • hskoglundH Offline
    hskoglundH Offline
    hskoglund
    wrote on last edited by
    #61

    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 :-)

    1 Reply Last reply
    1
    • V Offline
      V Offline
      Volker75
      wrote on last edited by
      #62

      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?

      1 Reply Last reply
      0
      • hskoglundH Offline
        hskoglundH Offline
        hskoglund
        wrote on last edited by
        #63

        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)

        1 Reply Last reply
        1
        • V Volker75 has marked this topic as solved on
        • V Offline
          V Offline
          Volker75
          wrote on last edited by
          #64

          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!

          1 Reply Last reply
          0
          • V Offline
            V Offline
            Volker75
            wrote on last edited by Volker75
            #65

            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)

            1 Reply Last reply
            0
            • hskoglundH Offline
              hskoglundH Offline
              hskoglund
              wrote on last edited by
              #66

              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.

              1 Reply Last reply
              0
              • V Offline
                V Offline
                Volker75
                wrote on last edited by
                #67

                Thank you!

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved