Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. .ui form conversion into C++ header file by UIC
Forum Updated to NodeBB v4.3 + New Features

.ui form conversion into C++ header file by UIC

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
12 Posts 2 Posters 3.3k 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.
  • T Offline
    T Offline
    TahorSuiJurisBenYAH
    wrote on last edited by
    #1

    CHALLENGE (problem):
    #include "ui_Central.h"

    Issues: ui_Central.h: No such file or directory

    I am following a tutorial for my first Qt application:
    http://sector.ynet.sk/qt4-tutorial/my-first-qt-gui-application.html

    I used the code exactly as it is BUT I renamed
    myqtapp
    to
    Central
    in every occurrence.

    After about 40 hours straight and downloading many of the various selections from Qt website, I finally discovered that the downloads are based on the compiler to be used. The current download version I am using is qt-enterprise-windows-x86-mingw-w64-492-5.5.1.exe

    Please, what do I need to do to correct this error?

    Any and all suggestions greatly appreciated.

    kshegunovK 1 Reply Last reply
    0
    • T TahorSuiJurisBenYAH

      CHALLENGE (problem):
      #include "ui_Central.h"

      Issues: ui_Central.h: No such file or directory

      I am following a tutorial for my first Qt application:
      http://sector.ynet.sk/qt4-tutorial/my-first-qt-gui-application.html

      I used the code exactly as it is BUT I renamed
      myqtapp
      to
      Central
      in every occurrence.

      After about 40 hours straight and downloading many of the various selections from Qt website, I finally discovered that the downloads are based on the compiler to be used. The current download version I am using is qt-enterprise-windows-x86-mingw-w64-492-5.5.1.exe

      Please, what do I need to do to correct this error?

      Any and all suggestions greatly appreciated.

      kshegunovK Offline
      kshegunovK Offline
      kshegunov
      Moderators
      wrote on last edited by
      #2

      @TahorSuiJurisBenYAH
      Hello,
      Could you please provide your .pro file?

      Kind regards.

      Read and abide by the Qt Code of Conduct

      1 Reply Last reply
      0
      • T Offline
        T Offline
        TahorSuiJurisBenYAH
        wrote on last edited by
        #3

        wow, thank you shall do. I just re did the entire tutorial in the original as provided.
        how do I attach the files or code?

        kshegunovK 1 Reply Last reply
        0
        • T TahorSuiJurisBenYAH

          wow, thank you shall do. I just re did the entire tutorial in the original as provided.
          how do I attach the files or code?

          kshegunovK Offline
          kshegunovK Offline
          kshegunov
          Moderators
          wrote on last edited by
          #4

          @TahorSuiJurisBenYAH
          Just paste your .pro file as a post here between tree backticks: ```. This will generate a code block and everything should be clearly visible.

          Read and abide by the Qt Code of Conduct

          1 Reply Last reply
          0
          • T Offline
            T Offline
            TahorSuiJurisBenYAH
            wrote on last edited by
            #5

            Thank you! for your kindness.

            it is the same as in the tuturial url
            http://sector.ynet.sk/qt4-tutorial/my-first-qt-gui-application.html

            HEADERS     = Central.h 
            SOURCES     = Central.cpp main.cpp
            FORMS       = Central.ui
            
            # install
            target.path = Central
            sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
            sources.path = .
            INSTALLS += target sources
            
            kshegunovK 1 Reply Last reply
            0
            • T TahorSuiJurisBenYAH

              Thank you! for your kindness.

              it is the same as in the tuturial url
              http://sector.ynet.sk/qt4-tutorial/my-first-qt-gui-application.html

              HEADERS     = Central.h 
              SOURCES     = Central.cpp main.cpp
              FORMS       = Central.ui
              
              # install
              target.path = Central
              sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
              sources.path = .
              INSTALLS += target sources
              
              kshegunovK Offline
              kshegunovK Offline
              kshegunov
              Moderators
              wrote on last edited by kshegunov
              #6

              @TahorSuiJurisBenYAH
              Hello,
              Is this your whole project file, it seems a bit strange. For example a pro file from a project of mine looks like this:

              QT += core gui widgets
              CONFIG += link_prl
              
              TARGET = ageditor
              TEMPLATE = app
              
              win32  {
              	DESTDIR = $$OUT_PWD  //< This is because I'm using shadow builds
              }
              
              SOURCES += \
              	ageditormain.cpp \
              	ageditorwindow.cpp
              
              HEADERS  += \
              	ageditorwindow.h
              
              FORMS    += \
              	ageditorwindow.ui
              

              You don't seem to have put your full Qt configuration. Could you add these lines:

              QT += core gui widgets
              TARGET = Central
              TEMPLATE = app
              

              Rerun qmake and see what you get.

              Also this part:

              target.path = Central
              sources.files = $SOURCES $HEADERS $RESOURCES $FORMS *.pro
              sources.path = .
              INSTALLS += target sources
              

              I don't really understand.

              As a side note, what IDE are you using for development?

              Kind regards.

              Read and abide by the Qt Code of Conduct

              1 Reply Last reply
              0
              • T Offline
                T Offline
                TahorSuiJurisBenYAH
                wrote on last edited by
                #7

                This is the IDE:

                Filename: qt-enterprise-windows-x86-mingw-w64-492-5.5.1.exe

                Description: Qt Enterprise offline installer for Windows host operating system. The package provides everything you need to start Qt development:

                kshegunovK 1 Reply Last reply
                0
                • T TahorSuiJurisBenYAH

                  This is the IDE:

                  Filename: qt-enterprise-windows-x86-mingw-w64-492-5.5.1.exe

                  Description: Qt Enterprise offline installer for Windows host operating system. The package provides everything you need to start Qt development:

                  kshegunovK Offline
                  kshegunovK Offline
                  kshegunov
                  Moderators
                  wrote on last edited by
                  #8

                  @TahorSuiJurisBenYAH
                  Hello,

                  This is the IDE:
                  Filename: qt-enterprise-windows-x86-mingw-w64-492-5.5.1.exe

                  Well this is an SDK package that contains the MinGW 65 bit compiler, Qt 5.5.1 and (probably) QtCreator. However you're not bound in any way to the QtCreator IDE, that's why I'm asking. You could be using some other tool to build your projects. In any case, I'd assume you're using the QtCreator, but that notwithstanding, you should still at least add the QT += configuration in your project.

                  Kind regards.

                  Read and abide by the Qt Code of Conduct

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    TahorSuiJurisBenYAH
                    wrote on last edited by
                    #9

                    ok how do I do that please

                    kshegunovK 1 Reply Last reply
                    0
                    • T TahorSuiJurisBenYAH

                      ok how do I do that please

                      kshegunovK Offline
                      kshegunovK Offline
                      kshegunov
                      Moderators
                      wrote on last edited by
                      #10

                      @TahorSuiJurisBenYAH
                      You just edit your .pro file (double-clicking on it in the project view) and edit it manually. Look inhere I think it'll help you set your project up.

                      Kind regards.

                      Read and abide by the Qt Code of Conduct

                      1 Reply Last reply
                      0
                      • T Offline
                        T Offline
                        TahorSuiJurisBenYAH
                        wrote on last edited by
                        #11

                        The whole thing is in Qt Creator. That is not the problem, the problem is why ui_Central.h is not being created.

                        1 Reply Last reply
                        0
                        • kshegunovK Offline
                          kshegunovK Offline
                          kshegunov
                          Moderators
                          wrote on last edited by
                          #12

                          @TahorSuiJurisBenYAH
                          Hello,
                          It should be, provided your form is called Central.ui and you have the line FORMS += Central.ui in your project file the uic is supposed to create ui_Central.h for you when qmake runs. Maybe there's some problem with the path. Could you check whether the ui_Central.h is created or not in your build folder?

                          Kind regards.

                          Read and abide by the 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