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. Custom widget in my project and now project build fails
QtWS25 Last Chance

Custom widget in my project and now project build fails

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
3 Posts 2 Posters 165 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.
  • P Offline
    P Offline
    pmacmillan2000
    wrote on last edited by pmacmillan2000
    #1

    Hi friends,
    I have a very simple Desktop app made with Qt Creator; I added a new custom widget to the project, using Add New... Qt Widgets Designer Form Class options. I see the new .ui file and saw the generated .h file in project and all looked good.

    I tried to use the new widget (which derives from QWidget) by promoting a QWidget to the new class on my mainwindow.ui form, and that seemed to work too but now when I build the project, I get "no such file or directory" error referring to the .h file generated from the custom .ui file.

    Thing is, I can see the .h file, and I haven't hardcoded any references or "#includes"... I can't see why the build is failing. I even see the .ui, .h and .cpp files for the custom widget in the CMakeLists.txt file.

    1 Reply Last reply
    0
    • P Offline
      P Offline
      pmacmillan2000
      wrote on last edited by
      #2

      (Also I did try this in a qmake project and it was successful so the issue I am facing may be peculiar to CMake-based projects.)

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by SGaist
        #3

        Hi,

        Is the auto uic cmake option enable ?

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

        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