Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. moc-generated code error at Qt6 when not at Qt5
QtWS25 Last Chance

moc-generated code error at Qt6 when not at Qt5

Scheduled Pinned Locked Moved Solved Qt 6
18 Posts 3 Posters 1.4k 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.
  • Axel SpoerlA Axel Spoerl

    I am using gcc 13.3.0, moc 6.9.0.
    The only difference in our CMake files is that I require 3.16, you require 3.14.

    JonBJ Offline
    JonBJ Offline
    JonB
    wrote on last edited by JonB
    #9

    @Axel-Spoerl
    Thank you. So what would you like me to do about our difference in behaviour? :)
    [I fetch all my Qt stuff from apt as supplied with Ubuntu 24.04 distro.]

    1 Reply Last reply
    0
    • J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #10

      I actually remember something similar, early when QVector was nuked for QList to prosper.

      I think if you change it from QList<Bar *>bars to QList<Bar *> *bars it actually works. Axel is using a way later Qt6 version ( 6.8 vs 6.4.2) QList was probably touched again in between those versions, to fix this :D


      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.

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

        I actually remember something similar, early when QVector was nuked for QList to prosper.

        I think if you change it from QList<Bar *>bars to QList<Bar *> *bars it actually works. Axel is using a way later Qt6 version ( 6.8 vs 6.4.2) QList was probably touched again in between those versions, to fix this :D

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #11

        @J-Hilk said in moc-generated code error at Qt6 when not at Qt5:

        I think if you change it from QList<Bar *>bars to QList<Bar *> *bars it actually works.

        But those are quite different types! :) Are you just showing me that to say what it could cope with?

        Axel is using a way later Qt6 version ( 6.8 vs 6.4.2) QList was probably touched again in between those versions, to fix this :D

        Ah! Well in that case it's obviously not to be reported. Thanks for the heads-up.

        With Qt5 I always had Qt 5.15 (or maybe 5.12) via apt under various Ubuntu releases over the years. And I have to say that was just great, I didn't encounter problems and I didn't need later versions. I suspected Qt6 would be problematic, looks like I get a quite older version and am going to have issues which really need a later version from TQtC :( Ho-hum....

        J.HilkJ 1 Reply Last reply
        0
        • JonBJ JonB

          @J-Hilk said in moc-generated code error at Qt6 when not at Qt5:

          I think if you change it from QList<Bar *>bars to QList<Bar *> *bars it actually works.

          But those are quite different types! :) Are you just showing me that to say what it could cope with?

          Axel is using a way later Qt6 version ( 6.8 vs 6.4.2) QList was probably touched again in between those versions, to fix this :D

          Ah! Well in that case it's obviously not to be reported. Thanks for the heads-up.

          With Qt5 I always had Qt 5.15 (or maybe 5.12) via apt under various Ubuntu releases over the years. And I have to say that was just great, I didn't encounter problems and I didn't need later versions. I suspected Qt6 would be problematic, looks like I get a quite older version and am going to have issues which really need a later version from TQtC :( Ho-hum....

          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by
          #12

          @JonB what was the reason again, why you don't fetch the latest version from the installer or the repo (to compile yourself) ?


          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.

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

            @JonB what was the reason again, why you don't fetch the latest version from the installer or the repo (to compile yourself) ?

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by
            #13

            @J-Hilk

            • I have never even attempted to download from TQtC, having seen the endless problems with downloads/mirrors. Fills me with dread....
            • ...As does when I see people who for whatever reason (e.g. maybe to do with configuration, whatever it happens) get an error during compilation of the whole of Qt....
            • I don't have the disk space in VM for Qt sources + compilation outputs.
            • I don't have the memory in VM to compile it. Not to mention the requirements for QWebEngine.
            • I share (development) with other people using Qt from Ubuntu distro. They are not going to want to fetch/compile/install or take from me.

            Am I being difficult? ;-) It was all so simple with Qt5, everything worked. Now beginning to think of backing out of the whole of Qt6 and reverting to Qt5. But that would be a shame for my answering questions on this forum.

            J.HilkJ 1 Reply Last reply
            0
            • JonBJ JonB

              @J-Hilk

              • I have never even attempted to download from TQtC, having seen the endless problems with downloads/mirrors. Fills me with dread....
              • ...As does when I see people who for whatever reason (e.g. maybe to do with configuration, whatever it happens) get an error during compilation of the whole of Qt....
              • I don't have the disk space in VM for Qt sources + compilation outputs.
              • I don't have the memory in VM to compile it. Not to mention the requirements for QWebEngine.
              • I share (development) with other people using Qt from Ubuntu distro. They are not going to want to fetch/compile/install or take from me.

              Am I being difficult? ;-) It was all so simple with Qt5, everything worked. Now beginning to think of backing out of the whole of Qt6 and reverting to Qt5. But that would be a shame for my answering questions on this forum.

              J.HilkJ Offline
              J.HilkJ Offline
              J.Hilk
              Moderators
              wrote on last edited by
              #14

              @JonB I Understand, I myself are still on 5.15.17 and I stay with 5 as long as possible.

              But Android support is apparently already dropped for Qt5. So I have at most a year until I have to switch over :(


              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.

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

                @JonB I Understand, I myself are still on 5.15.17 and I stay with 5 as long as possible.

                But Android support is apparently already dropped for Qt5. So I have at most a year until I have to switch over :(

                JonBJ Offline
                JonBJ Offline
                JonB
                wrote on last edited by
                #15

                @J-Hilk said in moc-generated code error at Qt6 when not at Qt5:

                @JonB I Understand, I myself are still on 5.15.17 and I stay with 5 as long as possible.

                OMG! What platform/OS version are you on?

                J.HilkJ 1 Reply Last reply
                0
                • JonBJ JonB

                  @J-Hilk said in moc-generated code error at Qt6 when not at Qt5:

                  @JonB I Understand, I myself are still on 5.15.17 and I stay with 5 as long as possible.

                  OMG! What platform/OS version are you on?

                  J.HilkJ Offline
                  J.HilkJ Offline
                  J.Hilk
                  Moderators
                  wrote on last edited by J.Hilk
                  #16

                  @JonB windows, macOS, iOS, iPadOS & Android. Still so far all the latest available (not betas)


                  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.

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

                    @JonB windows, macOS, iOS, iPadOS & Android. Still so far all the latest available (not betas)

                    JonBJ Offline
                    JonBJ Offline
                    JonB
                    wrote on last edited by
                    #17

                    @J-Hilk Right, but not my Ubuntu 24.04 which I am moving to, and doing Qt as part of it.

                    J.HilkJ 1 Reply Last reply
                    0
                    • JonBJ JonB

                      @J-Hilk Right, but not my Ubuntu 24.04 which I am moving to, and doing Qt as part of it.

                      J.HilkJ Offline
                      J.HilkJ Offline
                      J.Hilk
                      Moderators
                      wrote on last edited by
                      #18

                      @JonB non of our customers use Linux, only reason why we support macOS is because its my development environment and its only a few steps more to deploy for it as well ;)


                      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.

                      1 Reply Last reply
                      0
                      • JonBJ JonB 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