Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Visual Studio Tools

Qt Visual Studio Tools

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
visual studiovisualgdbrpiqmetaobjectsuperdata
4 Posts 2 Posters 1.3k 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.
  • S Offline
    S Offline
    sbartolett
    wrote on 7 Jan 2022, 15:19 last edited by
    #1

    We have several applications developed using Visual Studios 2017, Qt Visual Studio Tools Vers 2.1.2, VisualGDB 5.5 and Qt Vers 5.12.3. We build on Windows 10 and target Raspberry Pi. Recently due to a computer upgrade I needed to reinstall all of the above tools. I am now getting an undeclared QMetaObject::SuperData. When I look at the generated moc_* file I see that it is using Qt 5.15.2.

    When I reinstalled the Qt Visual Studio Tools, I installed the latest release. I am assuming this is the cause of my compile error. How can I installed an older version of QT Visual Studio Tools?

    J 1 Reply Last reply 7 Jan 2022, 15:35
    0
    • S sbartolett
      7 Jan 2022, 15:19

      We have several applications developed using Visual Studios 2017, Qt Visual Studio Tools Vers 2.1.2, VisualGDB 5.5 and Qt Vers 5.12.3. We build on Windows 10 and target Raspberry Pi. Recently due to a computer upgrade I needed to reinstall all of the above tools. I am now getting an undeclared QMetaObject::SuperData. When I look at the generated moc_* file I see that it is using Qt 5.15.2.

      When I reinstalled the Qt Visual Studio Tools, I installed the latest release. I am assuming this is the cause of my compile error. How can I installed an older version of QT Visual Studio Tools?

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 7 Jan 2022, 15:35 last edited by
      #2

      @sbartolett Please do not double post!
      You already asked same question here: https://forum.qt.io/topic/133342/undeclared-qmetaobject-superdata

      "file I see that it is using Qt 5.15.2" - then make sure you're suing correct Qt version and do a complete rebuild (delete all build artefacts and then build).

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sbartolett
        wrote on 7 Jan 2022, 16:40 last edited by
        #3

        Sorry for the double post.

        I have tried to clean and doing a complete rebuild. I also have created a new project and I get the same error.

        I'm selecting the Qt version in Visual Studios using Qt VS Tools/Qt Version. That shows that I only have one version of Qt installed - 5.12.3. Is there some other place I should be selecting the Qt version?

        When creating the new project these are the settings I use:
        VisaualGDB/Linux Project Wizard
        Application, Qt, A Qt5-based application (CMake)
        Ninja
        Use the advanced CMake Project Subsystem
        Build the project locally with a cross-compiler
        Cross-toolchain: Raspberry PI in C:\SysGCC\raspberry (GCC 8.30, GDB 8.2.1, Revision 1, Buster

        1 Reply Last reply
        0
        • S Offline
          S Offline
          sbartolett
          wrote on 19 Jan 2022, 19:58 last edited by
          #4

          We have a little more information regarding our problem.

          When using Visual GDB to create a new QT project for Raspberry PI, if the toolchain folder ‘C:\SysGCC\raspberry\Qt\v5-CMake’ doesn’t exist or is empty, the QT build tools are automatically downloaded and installed. The problem we are seeing is that the build tools end up being a different version (Qt v5.15.2) than what is being used on our target Raspberry Pi platform (Qt v5.12.3). This results in the following error produced by the moc compiler indicating that its attempting to compile using the much newer header libraries.

                      LinuxProject1_autogen/EWIEGA46WW/moc_MainWindow.cpp:80:18: error: 'QMetaObject::SuperData' has not been declared
                     QMetaObject::SuperData::link<QMainWindow::staticMetaObject>(),
                        ^~~~~~~~~
          

          LinuxProject1_autogen/EWIEGA46WW/moc_MainWindow.cpp:80:65: error: expected primary-expression before ')' token
          QMetaObject::SuperData::linkQMainWindow::staticMetaObject(),

          Is there anything we can set in Visual Studio or elsewhere that will insure the downloaded Qt build tools match the Qt version on the target board?

          This is our development environment

          Windows 10
          Visual Studio 2017
          Qt Visual Studio Tools Version 2.8.1.6
          Visual GDB 5.6R2
          Qt build tools vers 5.12.3

          And we are targetting Raspberry PI OS vresion Raspbian 10.

          We are working around this problem by manually copying the odler set of build tools into ‘C:\SysGCC\raspberry\Qt\v5-CMake’ before making a new project using VisualGDB. We were fortunate that we had an older set of Qt build tools on another development PC to copy these from. This is not a good long term solution for us.

          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