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. Debugging Qt issues

Debugging Qt issues

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 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.
  • N Offline
    N Offline
    nickw1881
    wrote on last edited by
    #1

    So I made a qt widget copying the generic widget from the gui wizard. I triple checked me widget.cpp, widget.h files, and main file against the one created by the gui wizard. It doesn't compile.

    The errors are in my ui_widget.h file, which is supposed to be auto-generated. How do I fix this? I can post my code if necessary.

    1 Reply Last reply
    0
    • JeroentjehomeJ Offline
      JeroentjehomeJ Offline
      Jeroentjehome
      wrote on last edited by
      #2

      Hi,
      Posting the error with it is always a good idea. That gives some clues to where the compiler runs into trouble. The ui_x.h file is generated with qmake. When you change something in your designer form, qmake will be updated automatic, but in rare occasions is doesn't. Two ways to try is to run qmake after a clean operation. If that doesn't work, please delete the entire build directory so the compiler is forced to rebuild the entire project including the ui files.

      Greetz, Jeroen

      1 Reply Last reply
      0
      • N Offline
        N Offline
        nickw1881
        wrote on last edited by
        #3

        So, I have a project, and I basically just add a widget form class using the wizard. File>New>Qt>Qt Designer Form Class>Widget>name "dash"

        It should compile after that, it compiled before, but it doesn't compile.

        The errors are:
        In file included from ../../../Qt5.1.1/5.1.1/gcc/include/QtWidgets/QApplication:1:0,
        from ./ui_dash.h:14,
        from ../ROV-Pilot/dash.cpp:2:
        ../../../Qt5.1.1/5.1.1/gcc/include/QtWidgets/qapplication.h:111:24: error: missing binary operator before token "("
        ../../../Qt5.1.1/5.1.1/gcc/include/QtWidgets/qapplication.h:151:24: error: missing binary operator before token "("
        ../../../Qt5.1.1/5.1.1/gcc/include/QtWidgets/qapplication.h:181:24: error: missing binary operator before token "("
        In file included from ../../../Qt5.1.1/5.1.1/gcc/include/QtWidgets/qabstractitemview.h:47:0,
        from ../../../Qt5.1.1/5.1.1/gcc/include/QtWidgets/qheaderview.h:45,
        from ../../../Qt5.1.1/5.1.1/gcc/include/QtWidgets/QHeaderView:1,
        from ./ui_dash.h:16,
        from ../ROV-Pilot/dash.cpp:2:
        ../../../Qt5.1.1/5.1.1/gcc/include/QtCore/qitemselectionmodel.h:93:24: error: missing binary operator before token "("
        In file included from ../../../Qt5.1.1/5.1.1/gcc/include/QtWidgets/QHeaderView:1:0,
        from ./ui_dash.h:16,
        from ../ROV-Pilot/dash.cpp:2:
        ../../../Qt5.1.1/5.1.1/gcc/include/QtWidgets/qheaderview.h:117:24: error: missing binary operator before token "("
        ../../../Qt5.1.1/5.1.1/gcc/include/QtWidgets/qheaderview.h:124:24: error: missing binary operator before token "("
        ../../../Qt5.1.1/5.1.1/gcc/include/QtWidgets/qheaderview.h:135:24: error: missing binary operator before token "("
        In file included from ../../../Qt5.1.1/5.1.1/gcc/include/QtWidgets/QAction:1:0,
        from ./ui_dash.h:13,
        from ../ROV-Pilot/dash.cpp:2:
        ../../../Qt5.1.1/5.1.1/gcc/include/QtWidgets/qaction.h:61:32: error: expected initializer before ':' token
        make: *** [dash.o] Error 1
        23:39:39: The process "/usr/bin/make" exited with code 2.

        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