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 failed on qchildevent after converting code from qt3 to qt4

Connection failed on qchildevent after converting code from qt3 to qt4

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 329 Views 1 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.
  • G Offline
    G Offline
    giusdbg
    wrote on last edited by
    #1

    Hi.

    The two connects in the qchildevent function in qt4 fail, and I have no idea why.

    At the top left you see the values of the variables in qt4 and at the bottom right in qt3.

    The only thing I notice is unknown ‘clas’.

    Can anyone help me?

    Screenshot_20230520_175827.png

    SGaistS 1 Reply Last reply
    0
    • G giusdbg

      Hi.

      The two connects in the qchildevent function in qt4 fail, and I have no idea why.

      At the top left you see the values of the variables in qt4 and at the bottom right in qt3.

      The only thing I notice is unknown ‘clas’.

      Can anyone help me?

      Screenshot_20230520_175827.png

      SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Someone seems to have already done the job. You might want to check this project.

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

      G 2 Replies Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Someone seems to have already done the job. You might want to check this project.

        G Offline
        G Offline
        giusdbg
        wrote on last edited by giusdbg
        #3

        @SGaist Thank you.
        The one in sourceforge is my project.

        The qchildevent situation is even stranger
        -- In qt3 the events for inserted() are generated only after the exec() .
        -- In qt4 the events for added() are all generated first, during the construction phase of the objects.

        1 Reply Last reply
        0
        • SGaistS SGaist

          Hi and welcome to devnet,

          Someone seems to have already done the job. You might want to check this project.

          G Offline
          G Offline
          giusdbg
          wrote on last edited by giusdbg
          #4

          @SGaist @giusdbg I think I found and solved (if there will be no side effects), there are different event handling in qt4.

          This way the added event is called while the Sensors object is still being built, and the connect fails.

          Sensor::Sensor(SensorsList *parent,const char *name): QObject(parent)

          In this way the added event takes place after the construction of the Sensors

          Sensor::Sensor(SensorsList *parent,const char *name): QObject()
          ........
          setParent(parent);

          1 Reply Last reply
          0
          • G giusdbg has marked this topic as solved on

          • Login

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