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. QtCreator not compiling forms
Forum Updated to NodeBB v4.3 + New Features

QtCreator not compiling forms

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 838 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.
  • M Offline
    M Offline
    montanaviking
    wrote on last edited by
    #1

    Re: How can I disable the shadow builds perpetually?

    I cannot get QtCreator to compile or update my forms even though shadow building is disabled.
    If I update the layout form and rebuild all, the changes do not ripple to the compiled code nor the form.h file.
    I'm using Qt Creator 4.9.2
    Thanks,
    Phil

    Pablo J. RoginaP 1 Reply Last reply
    0
    • M montanaviking

      Re: How can I disable the shadow builds perpetually?

      I cannot get QtCreator to compile or update my forms even though shadow building is disabled.
      If I update the layout form and rebuild all, the changes do not ripple to the compiled code nor the form.h file.
      I'm using Qt Creator 4.9.2
      Thanks,
      Phil

      Pablo J. RoginaP Offline
      Pablo J. RoginaP Offline
      Pablo J. Rogina
      wrote on last edited by
      #2

      @montanaviking could you please show your .pro file?

      Upvote the answer(s) that helped you solve the issue
      Use "Topic Tools" button to mark your post as Solved
      Add screenshots via postimage.org
      Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • M Offline
        M Offline
        montanaviking
        wrote on last edited by
        #3

        Hi and thanks!
        ###########################################################
        QT += core gui sql widgets

        TARGET = sql_Qtcreator
        TEMPLATE = app

        The following define makes your compiler emit warnings if you use

        any feature of Qt which has been marked as deprecated (the exact warnings

        depend on your compiler). Please consult the documentation of the

        deprecated API in order to know how to port your code away from it.

        DEFINES += QT_DEPRECATED_WARNINGS

        You can also make your code fail to compile if you use deprecated APIs.

        In order to do so, uncomment the following line.

        You can also select to disable deprecated APIs only up to a certain version of Qt.

        #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

        CONFIG += c++17

        SOURCES +=
        ActionTable.cpp
        Paper_Model.cpp
        Sql.cpp
        SqlTableView.cpp
        columncombobox.cpp
        logic.cpp
        main.cpp
        sqlForeignKeyDelegate.cpp

        HEADERS +=
        ActionTable.h
        Paper_Model.h
        Sql.h
        SqlTableView.h
        columncombobox.h
        constants.h
        sqlForeignKeyDelegate.h
        library.h
        sqlsetup.h

        FORMS +=
        library.ui

        Default rules for deployment.

        qnx: target.path = /tmp/$${TARGET}/bin
        else: unix:!android: target.path = /opt/$${TARGET}/bin
        !isEmpty(target.path): INSTALLS += target
        ################################################################

        Removal of the library.h file results in a linker error because library.h is not being automatically generated from library.ui.
        I have attempted to clean all and rebuild but apparently uic is not automatically running so library.h is not being generated.
        This is running on Ubuntu 18.04 64 bit.
        Thanks again!
        Phil

        1 Reply Last reply
        0
        • M Offline
          M Offline
          montanaviking
          wrote on last edited by
          #4

          Thanks for bearing with me. It appears I found the problem in that I had misnamed the include file that uic was actually producing. uic was producing a different include filename and I had not included that in my .pro file. Instead, I had included library.h in my .pro file when the correct name is ui_library.h
          Thanks,
          Phil

          U 1 Reply Last reply
          0
          • M montanaviking

            Thanks for bearing with me. It appears I found the problem in that I had misnamed the include file that uic was actually producing. uic was producing a different include filename and I had not included that in my .pro file. Instead, I had included library.h in my .pro file when the correct name is ui_library.h
            Thanks,
            Phil

            U Offline
            U Offline
            umod.47
            wrote on last edited by
            #5

            @montanaviking ui_library.h doesn't need to be included.
            You should only #include "ui_library.h" in your c++ file where your ui is being used (this is usually done automatically by Qt master when you create new class with form).
            ui_*.h are generated and should not be included to .pro file, otherwise qmake will fail on first start, being unable to find the file you specified but not created yet.

            Press ESCAPE to enter or ENTER to escape.
            Keyboard not found. Press F1 to continue.
            (c) BIOS

            1 Reply Last reply
            1

            • Login

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