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. Connection to worker(QThread) get broken in 5.12 update

Connection to worker(QThread) get broken in 5.12 update

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 5 Posters 1.6k Views 3 Watching
  • 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.
  • EngelardE Offline
    EngelardE Offline
    Engelard
    wrote on last edited by Engelard
    #1

    Good evening everyone.

    My old project was made with 5.10 version, it works perfectly by then. No warnings in runtime. And today i opened it in my new Qt 5.12, just compile it, program runs well(as i thought), but i notice some changes, from QCreator side and QDesigner. Like option in Designer "horizontalHeaderMinimumSize(int)" was changed by framework from my old "1" value, to default(60 or smth), i about 20 minutes could'nt figure out why my simple part of code

    ui->tabWidMain->setColumnWidth(0, 6);
    

    not working anymore, because i know everything was fine before, so not by my actions such things work incorrect.

    But that quite simple example, hard task comes with thread, it gives me that message to Application Output in runtime when user trigger certain SIGNAL:

    QObject::connect: Cannot queue arguments of type 'HANDLE'
    (Make sure 'HANDLE' is registered using qRegisterMetaType().)

    At first version it was DWORD, but i changed it to HANDLE, so matter of this error is not a type i suppose, it is something with connection or i don't know what else it may be.

    While app was build on 5.10 it runs well, and thread with this single function was running properly as it should, now thread never starts, no reaction when SIGNAL triggered(only that message to output). I did not change anything really in this app, something get change without my knowledge like that parameter "horizontalHeaderMinimumSize(int)".

    Help please. The code in constructor:

    workerProc = new worker;
    procThread = new QThread;
    workerProc->moveToThread(procThread);
    connect(this, SIGNAL(sendHDL(HANDLE)), workerProc, SLOT(recieveProcHDL(HANDLE)));
    procThread->start(QThread::LowPriority);
    
    JKSHJ 1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Have you used qRegisterMetaType() like the error suggests?

      (Z(:^

      EngelardE 1 Reply Last reply
      0
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #3

        I feel for you, by the way. Every new release since 5.9 kept breaking the projects I was working on. And 5.12... well, hard to comment on that. The UIs are completely broken or don't show at all.

        (Z(:^

        J.HilkJ 1 Reply Last reply
        0
        • sierdzioS sierdzio

          I feel for you, by the way. Every new release since 5.9 kept breaking the projects I was working on. And 5.12... well, hard to comment on that. The UIs are completely broken or don't show at all.

          J.HilkJ Online
          J.HilkJ Online
          J.Hilk
          Moderators
          wrote on last edited by
          #4

          @sierdzio uh really?
          hadn‘t yet the time to download it. I was hoping for magical fixes of a couple of issues I had

          I have a release date next week and I kind of wanted to use the new lte 😭


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          sierdzioS 1 Reply Last reply
          0
          • sierdzioS sierdzio

            Have you used qRegisterMetaType() like the error suggests?

            EngelardE Offline
            EngelardE Offline
            Engelard
            wrote on last edited by Engelard
            #5

            @sierdzio said in Connection to worker(QThread) get broken in 5.12 update:

            Have you used qRegisterMetaType() like the error suggests?

            Nope, i never used it before 'cause it never ask for it and everything was working perfectly.

            EDIT:
            Now i used it(in constructor, before everything). No messages to Output now, but thread still not working... And such stuff makes no sense i don't know:

            qRegisterMetaType<HANDLE>("HANDLE");
            
            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Hi,

              Use the version without parameter. This one is for registering aliases.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              EngelardE 1 Reply Last reply
              1
              • SGaistS SGaist

                Hi,

                Use the version without parameter. This one is for registering aliases.

                EngelardE Offline
                EngelardE Offline
                Engelard
                wrote on last edited by
                #7

                @SGaist said in Connection to worker(QThread) get broken in 5.12 update:

                Use the version without parameter. This one is for registering aliases.

                already tried that at first, same effect like i'd not using it at all, same error and thread not working.

                1 Reply Last reply
                0
                • EngelardE Offline
                  EngelardE Offline
                  Engelard
                  wrote on last edited by Engelard
                  #8

                  I totally removed that function, now thread works, i confused. Making projects on different versions definitely bad idea.

                  But found new one. It tells that QListWidget don't have such SIGNAL anymore:

                  QObject::connect: No such signal QListWidget::itemClicked(QListWidgetItem) in ..\OD\finalresult.cpp:36
                  QObject::connect: (receiver name: 'FinalResult')

                  Here this line 36:

                  connect(&valList, SIGNAL(itemClicked(QListWidgetItem)), this, SLOT(listItemSelected(QListWidgetItem)));
                  

                  Again, everything was working, after run in 5.12 such dumb errors. itemClicked is not even my signal, it's Qt's...

                  EDIT:
                  Forgot ampersand sign*)

                  1 Reply Last reply
                  0
                  • EngelardE Engelard

                    Good evening everyone.

                    My old project was made with 5.10 version, it works perfectly by then. No warnings in runtime. And today i opened it in my new Qt 5.12, just compile it, program runs well(as i thought), but i notice some changes, from QCreator side and QDesigner. Like option in Designer "horizontalHeaderMinimumSize(int)" was changed by framework from my old "1" value, to default(60 or smth), i about 20 minutes could'nt figure out why my simple part of code

                    ui->tabWidMain->setColumnWidth(0, 6);
                    

                    not working anymore, because i know everything was fine before, so not by my actions such things work incorrect.

                    But that quite simple example, hard task comes with thread, it gives me that message to Application Output in runtime when user trigger certain SIGNAL:

                    QObject::connect: Cannot queue arguments of type 'HANDLE'
                    (Make sure 'HANDLE' is registered using qRegisterMetaType().)

                    At first version it was DWORD, but i changed it to HANDLE, so matter of this error is not a type i suppose, it is something with connection or i don't know what else it may be.

                    While app was build on 5.10 it runs well, and thread with this single function was running properly as it should, now thread never starts, no reaction when SIGNAL triggered(only that message to output). I did not change anything really in this app, something get change without my knowledge like that parameter "horizontalHeaderMinimumSize(int)".

                    Help please. The code in constructor:

                    workerProc = new worker;
                    procThread = new QThread;
                    workerProc->moveToThread(procThread);
                    connect(this, SIGNAL(sendHDL(HANDLE)), workerProc, SLOT(recieveProcHDL(HANDLE)));
                    procThread->start(QThread::LowPriority);
                    
                    JKSHJ Offline
                    JKSHJ Offline
                    JKSH
                    Moderators
                    wrote on last edited by JKSH
                    #9

                    @Engelard said in Connection to worker(QThread) get broken in 5.12 update:

                    Like option in Designer "horizontalHeaderMinimumSize(int)" was changed by framework from my old "1" value, to default(60 or smth), i about 20 minutes could'nt figure out why my simple part of code

                    Use source control (like Git). This will make such changes easy to detect.

                    @Engelard said in Connection to worker(QThread) get broken in 5.12 update:

                    I totally removed that function, now thread works, i confused. Making projects on different versions definitely bad idea.

                    But found new one. It tells that QListWidget don't have such SIGNAL anymore:

                    I suspect you have stale files somewhere.

                    1. Close Qt Creator.
                    2. Delete your build folders.
                    3. Delete your *.pro.user file
                    4. Open your project again and rebuild.

                    Does this make the errors go away?

                    Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                    1 Reply Last reply
                    1
                    • J.HilkJ J.Hilk

                      @sierdzio uh really?
                      hadn‘t yet the time to download it. I was hoping for magical fixes of a couple of issues I had

                      I have a release date next week and I kind of wanted to use the new lte 😭

                      sierdzioS Offline
                      sierdzioS Offline
                      sierdzio
                      Moderators
                      wrote on last edited by
                      #10

                      @J.Hilk said in Connection to worker(QThread) get broken in 5.12 update:

                      @sierdzio uh really?
                      hadn‘t yet the time to download it. I was hoping for magical fixes of a couple of issues I had

                      I have a release date next week and I kind of wanted to use the new lte 😭

                      Try it out, maybe it'll work for you. I didn't yet have the time to check and report the issues, but it is mighty annoying that working apps suddenly have all their layouts completely broken - and no warnings or errors on the console. "Dear developer, guess what we've changed" kind of thing.

                      I think I tried it back in Beta1 stage and the app worked, so maybe it will be fixed soon. As far as I know, Qt 5.12.1 already has 200+ bug fixes prepared (if you wonder why on earth would they release 5.12.0 when they already have hundreds of patches ready... I guess they rushed it so they can release during Qt conference).

                      (Z(:^

                      1 Reply Last reply
                      1

                      • Login

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