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. QT Creator cannot find <Qdialog> in Windows 10

QT Creator cannot find <Qdialog> in Windows 10

Scheduled Pinned Locked Moved Solved Installation and Deployment
31 Posts 5 Posters 14.5k Views 2 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.
  • B Offline
    B Offline
    BKBK
    wrote on last edited by
    #10

    Thanks for the reply. Lets try the code makers with:

    x = y;
    

    Ok, I got that thank you.

    1 Reply Last reply
    0
    • jsulmJ jsulm

      @BKBK If you don't need UWP then please install Qt for the regular Microsoft C++ compiler and try again using the new Kit.

      B Offline
      B Offline
      BKBK
      wrote on last edited by BKBK
      #11

      @jsulm Re If you don't need UWP then please install Qt for the regular Microsoft C++ compiler and try again using the new Kit.

      I have installed twice now. It cannot find one or more files. Why would a reduced install make the files easier to find. I have searched a bit and not found anything that describes the purpose of each install option. Does anyone have a link for that information.

      testing for quoted text.
      Works well, thanks JKSH, will try the other items tomorrow.

      1 Reply Last reply
      0
      • B BKBK

        There is no compile button. There is Build -> Build All, Build -> Build Project <project_name>, Build -> Rebuild All, but nothing with the moniker Compile. And no, they don’t fix the problem. If it cannot find QDialog, then the build process will not succeed.

        The first two lines in ex01.pro are:

        QT += quick
        CONFIG += c++11
        

        So added the line: CONFIG += GUI WIDGETS, still cannot find QDialog. The first error message is:
        Type ‘QDialog’ is not a direct or virtual base of FindDialog.

        UWP apps: Never heard of that, looked it up, and no, I will be happy with a regular windows app.

        And just to be sure added: QT += core gui to the .pro file to no avail.

        And just discovered that at home there are some icons not displayed when logged on at work, one of which does formatting. No edit option at work.

        JKSHJ Offline
        JKSHJ Offline
        JKSH
        Moderators
        wrote on last edited by JKSH
        #12

        @BKBK said in QT Creator cannot find <Qdialog> in Windows 10:

        QT += quick
        

        Change that line into QT += widgets quick.

        (And just to double check: Are you using Qt Quick? If not, then QT += widgets is enough)

        @BKBK said in QT Creator cannot find <Qdialog> in Windows 10:

        please advise me of the character strings that will identify quotes and code causing them to be more obvious in our posts.

        For quotes, put > on the left of your text.

        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

        1 Reply Last reply
        3
        • B Offline
          B Offline
          BKBK
          wrote on last edited by
          #13

          I am not using Qt Quick, just trying to get the first simple app running.

          aha_1980A 1 Reply Last reply
          0
          • B BKBK

            I am not using Qt Quick, just trying to get the first simple app running.

            aha_1980A Offline
            aha_1980A Offline
            aha_1980
            Lifetime Qt Champion
            wrote on last edited by
            #14

            @BKBK

            So can you show your .pro file?

            Qt has to stay free or it will die.

            1 Reply Last reply
            0
            • B Offline
              B Offline
              BKBK
              wrote on last edited by BKBK
              #15

              Here is the pro file. I have added a few lines at the top but otherwise unchanged from the auto-generated file. Most comments removed for brevity.

              QT += quick
              CONFIG += c++11
              CONFIG += GUI WIDGETS
              QT += core gui
              QT += widgets
              
              DEFINES += QT_DEPRECATED_WARNINGS
              
              Qt.
              #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
              
              SOURCES += \
                      main.cpp \
                  finddialog.cpp
              
              RESOURCES += qml.qrc
              
              # Additional import path used to resolve QML modules in Qt Creator's code model
              QML_IMPORT_PATH =
              
              # Additional import path used to resolve QML modules just for Qt Quick Designer
              QML_DESIGNER_IMPORT_PATH =
              
              # Default rules for deployment.
              qnx: target.path = /tmp/$${TARGET}/bin
              else: unix:!android: target.path = /opt/$${TARGET}/bin
              !isEmpty(target.path): INSTALLS += target
              

              I am using QT Creator 4.8.0-rc1 (4.7.84) based on Qt 5.12.0
              It is behaving a bit strange. I can manually open the .h file, but it won't stay open in the explorer panel. This is my first attempt with QT Creator. Is that normal?
              The code I am using is right out of the book.

              jsulmJ JKSHJ 2 Replies Last reply
              0
              • B BKBK

                Here is the pro file. I have added a few lines at the top but otherwise unchanged from the auto-generated file. Most comments removed for brevity.

                QT += quick
                CONFIG += c++11
                CONFIG += GUI WIDGETS
                QT += core gui
                QT += widgets
                
                DEFINES += QT_DEPRECATED_WARNINGS
                
                Qt.
                #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
                
                SOURCES += \
                        main.cpp \
                    finddialog.cpp
                
                RESOURCES += qml.qrc
                
                # Additional import path used to resolve QML modules in Qt Creator's code model
                QML_IMPORT_PATH =
                
                # Additional import path used to resolve QML modules just for Qt Quick Designer
                QML_DESIGNER_IMPORT_PATH =
                
                # Default rules for deployment.
                qnx: target.path = /tmp/$${TARGET}/bin
                else: unix:!android: target.path = /opt/$${TARGET}/bin
                !isEmpty(target.path): INSTALLS += target
                

                I am using QT Creator 4.8.0-rc1 (4.7.84) based on Qt 5.12.0
                It is behaving a bit strange. I can manually open the .h file, but it won't stay open in the explorer panel. This is my first attempt with QT Creator. Is that normal?
                The code I am using is right out of the book.

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #16

                @BKBK Is there a reason why you're using a release candidate and not a stable version?

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

                1 Reply Last reply
                0
                • B BKBK

                  Here is the pro file. I have added a few lines at the top but otherwise unchanged from the auto-generated file. Most comments removed for brevity.

                  QT += quick
                  CONFIG += c++11
                  CONFIG += GUI WIDGETS
                  QT += core gui
                  QT += widgets
                  
                  DEFINES += QT_DEPRECATED_WARNINGS
                  
                  Qt.
                  #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
                  
                  SOURCES += \
                          main.cpp \
                      finddialog.cpp
                  
                  RESOURCES += qml.qrc
                  
                  # Additional import path used to resolve QML modules in Qt Creator's code model
                  QML_IMPORT_PATH =
                  
                  # Additional import path used to resolve QML modules just for Qt Quick Designer
                  QML_DESIGNER_IMPORT_PATH =
                  
                  # Default rules for deployment.
                  qnx: target.path = /tmp/$${TARGET}/bin
                  else: unix:!android: target.path = /opt/$${TARGET}/bin
                  !isEmpty(target.path): INSTALLS += target
                  

                  I am using QT Creator 4.8.0-rc1 (4.7.84) based on Qt 5.12.0
                  It is behaving a bit strange. I can manually open the .h file, but it won't stay open in the explorer panel. This is my first attempt with QT Creator. Is that normal?
                  The code I am using is right out of the book.

                  JKSHJ Offline
                  JKSHJ Offline
                  JKSH
                  Moderators
                  wrote on last edited by
                  #17

                  @BKBK said in QT Creator cannot find <Qdialog> in Windows 10:

                  Here is the pro file. I have added a few lines at the top but otherwise unchanged from the auto-generated file.

                  Since you are using Qt Widgets and not Qt Quick, I suggest starting from scratch and creating a new project altogether: File > New File or Project... > Application > Qt Widgets Application

                  Also, when selecting a Kit, pick a "desktop" kit (MSVC or MinGW), not a "mobile" kit (UWP/WinRT or Android)

                  This should let you find QDialog out-of-the-box, without needing you to mess around with the .pro file.

                  I am using QT Creator 4.8.0-rc1 (4.7.84) based on Qt 5.12.0

                  Note: Qt Creator 4.8.0 has not been released yet. This is a preview version.

                  It should work fine, but it's best to stick to official releases when you're starting out.

                  Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

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

                    Just FYI, Qt 5.12 and Qt Creator 4.8 have been released today :-)

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

                    JKSHJ 1 Reply Last reply
                    2
                    • SGaistS SGaist

                      Just FYI, Qt 5.12 and Qt Creator 4.8 have been released today :-)

                      JKSHJ Offline
                      JKSHJ Offline
                      JKSH
                      Moderators
                      wrote on last edited by
                      #19

                      @SGaist said in QT Creator cannot find <Qdialog> in Windows 10:

                      Just FYI, Qt 5.12 and Qt Creator 4.8 have been released today :-)

                      Time to upgrade! :D

                      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                      1 Reply Last reply
                      0
                      • B Offline
                        B Offline
                        BKBK
                        wrote on last edited by
                        #20

                        replying to several posts at once:
                        From the QT web site I picked the latest release. There was nothing there to indicate that it was beta or anything other than a stable release.
                        Ok, so I need to install for the third time.
                        Questions:
                        Which release should I install?
                        When items should be and should not be installed? I wish to build applications for Windows 10. I have Visual Studio 2017 installed.
                        Should I use Visual Studio or some app within the QT environment to build my app?

                        If at some time in the future I wish to rebuild the app for android, how difficult will that be? What will I need to add?

                        JKSHJ 1 Reply Last reply
                        0
                        • B BKBK

                          replying to several posts at once:
                          From the QT web site I picked the latest release. There was nothing there to indicate that it was beta or anything other than a stable release.
                          Ok, so I need to install for the third time.
                          Questions:
                          Which release should I install?
                          When items should be and should not be installed? I wish to build applications for Windows 10. I have Visual Studio 2017 installed.
                          Should I use Visual Studio or some app within the QT environment to build my app?

                          If at some time in the future I wish to rebuild the app for android, how difficult will that be? What will I need to add?

                          JKSHJ Offline
                          JKSHJ Offline
                          JKSH
                          Moderators
                          wrote on last edited by JKSH
                          #21

                          @BKBK said in QT Creator cannot find <Qdialog> in Windows 10:

                          replying to several posts at once:
                          From the QT web site I picked the latest release. There was nothing there to indicate that it was beta or anything other than a stable release.

                          This sounds like a deficiency in the website; all pre-release builds need to be clearly labelled.

                          Can you post the link to the page where you picked the latest release? (Note: Qt 5.12 and Qt Creator 4.8 have just been released, so they are now official)

                          EDIT: I just had a thought: Did you select Preview > Qt Creator 4.8.0-rc1 from the installer? That might have been why you got a preview version. FYI, "RC" stands for "Release Candidate"

                          Which release should I install?
                          When items should be and should not be installed? I wish to build applications for Windows 10. I have Visual Studio 2017 installed.
                          Should I use Visual Studio or some app within the QT environment to build my app?

                          See https://1drv.ms/w/s!AnaQjhA33g0K0lkIZPVjfsWrcPSI for a fully detailed walkthrough. (If you have time, I would be grateful if you provide feedback on what's helpful and what's unclear in the document)

                          In summary:

                          • Use the Online installer.
                          • Install Qt > Qt 5.12.0 > MSVC 2017 32-bit
                            • Since you already have Visual Studio 2017, this is the only thing you need.
                            • You can choose MSVC 2017 64-bit instead, if you prefer.
                          • Qt Creator, the IDE, is automatically installed; you don't need to select it.
                          • Use Qt Creator to build your app.

                          In Qt Creator, select File > New File or Project... > Application > Qt Widgets Application to create your first project.

                          If at some time in the future I wish to rebuild the app for android, how difficult will that be? What will I need to add?

                          When that time comes,

                          1. Run MaintenanceTool.exe from the root folder where you installed Qt
                          2. Select Add/Remove Components
                          3. Select Qt > Qt 5.12.0 > Android _____

                          You will also need to separately install the Android development tools from Google. See https://doc.qt.io/qt-5/android-getting-started.html for details.

                          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                          1 Reply Last reply
                          3
                          • B Offline
                            B Offline
                            BKBK
                            wrote on last edited by
                            #22

                            @JKSH said in QT Creator cannot find <Qdialog> in Windows 10:

                            See https://1drv.ms/w/s!AnaQjhA33g0K0lkIZPVjfsWrcPSI for a fully detailed walkthrough. (If you have time, I would be grateful if you provide feedback on what's helpful and what's unclear in the document)

                            I detected my first error. When I saw the Preview option in the installed dialogs I presumed it meant to preview what I am about to install. After making that correction the install was much faster.
                            Some comments.

                            As I follow the Get Started thread of the creator I want the ability to separate that text and guidance from the creator so I can see it while I create the project. One on each monitor.

                            When selecting the components, please shown the total amount of data to be downloaded for each.
                            I am working it now but wanted to post before I spend considerable time in getting the first project running.
                            So far, so good.
                            Thanks for your details.

                            1 Reply Last reply
                            0
                            • B Offline
                              B Offline
                              BKBK
                              wrote on last edited by
                              #23

                              The install has been completed. Worked through a few menus and a few referenced web pages and found the example code for basic layouts. The project directory is here:
                              C:\QT5\Examples\Qt-5.12.0\widgets\layouts\basiclayouts
                              This line is flagged
                              #include <QApplication>
                              And the error QApplication not found.
                              I surmise there is a fundamental setup step to perform that I missed. Please advise me of where to find it.

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

                                I would do a search in the Qt installation to ensure that the file is there (and it should).

                                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
                                1
                                • B Offline
                                  B Offline
                                  BKBK
                                  wrote on last edited by BKBK
                                  #25

                                  Yes, it exists, here: "C:\QT5\5.12.0\msvc2017_64\include\QtWidgets\QApplication"
                                  After looking around the menu's for Qt Creator I don't see anything to indicate that the paths should be entered there for all projects. A right click on the project in the project explorer (the left panel of Creator) brings up a dialog that leads to a dialog to Add Library. When the path is pasted in the Next button remains disabled. Only the Cancel is enabled. That screen capture has been uploaded.
                                  When Visual Studio was installed, several times and multiple versions over the years, it never required the user to find all the libraries such as <iostream.h> and specifically tell VS where to find them. I do expect the same of Qt.
                                  edit: the point of the image is, in part: The dialog will not allow any editing in field Library:, field Include path contains a path, yet button Next is disabled. Please provide some information as to why the Next button is disabled.

                                  0_1544304309925_cannot add library.JPG

                                  aha_1980A 1 Reply Last reply
                                  0
                                  • B BKBK

                                    Yes, it exists, here: "C:\QT5\5.12.0\msvc2017_64\include\QtWidgets\QApplication"
                                    After looking around the menu's for Qt Creator I don't see anything to indicate that the paths should be entered there for all projects. A right click on the project in the project explorer (the left panel of Creator) brings up a dialog that leads to a dialog to Add Library. When the path is pasted in the Next button remains disabled. Only the Cancel is enabled. That screen capture has been uploaded.
                                    When Visual Studio was installed, several times and multiple versions over the years, it never required the user to find all the libraries such as <iostream.h> and specifically tell VS where to find them. I do expect the same of Qt.
                                    edit: the point of the image is, in part: The dialog will not allow any editing in field Library:, field Include path contains a path, yet button Next is disabled. Please provide some information as to why the Next button is disabled.

                                    0_1544304309925_cannot add library.JPG

                                    aha_1980A Offline
                                    aha_1980A Offline
                                    aha_1980
                                    Lifetime Qt Champion
                                    wrote on last edited by
                                    #26

                                    @BKBK Did you already build the project or was it just the inline error from the code model that showed up? I have seen that too a couple of times before the project was build first.

                                    Qt has to stay free or it will die.

                                    1 Reply Last reply
                                    0
                                    • B Offline
                                      B Offline
                                      BKBK
                                      wrote on last edited by
                                      #27

                                      That was from the first attempt. The first project has yet to be built.

                                      1 Reply Last reply
                                      0
                                      • B BKBK

                                        The install has been completed. Worked through a few menus and a few referenced web pages and found the example code for basic layouts. The project directory is here:
                                        C:\QT5\Examples\Qt-5.12.0\widgets\layouts\basiclayouts
                                        This line is flagged
                                        #include <QApplication>
                                        And the error QApplication not found.
                                        I surmise there is a fundamental setup step to perform that I missed. Please advise me of where to find it.

                                        JKSHJ Offline
                                        JKSHJ Offline
                                        JKSH
                                        Moderators
                                        wrote on last edited by
                                        #28

                                        @BKBK said in QT Creator cannot find <Qdialog> in Windows 10:

                                        The install has been completed. Worked through a few menus and a few referenced web pages and found the example code for basic layouts. The project directory is here:
                                        C:\QT5\Examples\Qt-5.12.0\widgets\layouts\basiclayouts
                                        This line is flagged
                                        #include <QApplication>
                                        And the error QApplication not found.
                                        I surmise there is a fundamental setup step to perform that I missed. Please advise me of where to find it.

                                        Please post screenshots of:

                                        • The screen which shows you the "QApplication not found" message
                                        • Tools > Options... > Kits > Kits
                                        • Tools > Options... > Kits > Qt Versions

                                        @BKBK said in QT Creator cannot find <Qdialog> in Windows 10:

                                        As I follow the Get Started thread of the creator I want the ability to separate that text and guidance from the creator so I can see it while I create the project. One on each monitor.

                                        Try the Window > Open in New Window menu item

                                        When selecting the components, please shown the total amount of data to be downloaded for each.

                                        It does, doesn't it? The 2nd screenshot at https://1drv.ms/w/s!AnaQjhA33g0K0lkIZPVjfsWrcPSI shows:

                                        Qt 5.11.0 Prebuilt Components for MinGW 5.3.0 32-bit

                                        This component will occupy approximately 3.64 GB on your hard disk drive.

                                        edit: the point of the image is, in part: The dialog will not allow any editing in field Library:, field Include path contains a path, yet button Next is disabled. Please provide some information as to why the Next button is disabled.

                                        This dialog is for adding 3rd-party libraries. Most Qt applications don't need it.

                                        For now, let's focus on your main issue (the inability to build example projects) -- please provide the screenshots requested above. I'll answer your questions about the Add Library dialog after that's resolved.

                                        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                                        1 Reply Last reply
                                        2
                                        • B Offline
                                          B Offline
                                          BKBK
                                          wrote on last edited by
                                          #29

                                          There is something, make that, there are a few things that are probably here but I am missing. This is a weekend and most developers have better things to do so I am going to split this into two threads.
                                          First, I answer the immediate questions posed about why Creator will not build the example project.
                                          After posting that, I have a suspicion that it might not like installing in directory QT5 rathner than just QT so I will uninstall and perform the same install to the true default directory C:\QT.
                                          To the first part, I am not able to build the example program. Here are the steps.
                                          Note that I was ready to change virus detection app to Bit Defender and currently have no protection application installed.

                                          1. Start QT Creator, click Example, scroll down to what looks like the most simple example, Basic Layouts and click it. A new window is opened

                                          Side note: I must capture each image again and save it to a file to insert here.
                                          0_1544374145971_pic 1.JPG

                                          The goal is to simply run an example so click Running the Example
                                          0_1544374376905_pic 2.JPG

                                          From the dialog, …open the Welcome mode …
                                          That is how I arrived here, circular, but understandable.
                                          Click Building and Running an Example and am rewarded with web page: http://doc.qt.io/qtcreator/creator-build-example-application.html
                                          It starts over. Repeat steps 1 and 2.
                                          This time the code is displayed, the main app.
                                          The first line if code is flagged as an error. It’s a mouse hover display so the display cannot be captured.
                                          Look across the bottom to see what is in the various items there. Compile Output is empty.
                                          General Messages contains this text:

                                          Running Windows Runtime device detection.
                                          No winrtrunner.exe found.
                                          Could not find qmake spec 'default'.
                                          Error while parsing file C:\QT5\Examples\Qt->5.12.0\widgets\layouts\basiclayouts\basiclayouts.pro. Giving up.

                                          The others are empty except search results which is a blank search form.

                                          Return to the web page for step 3:
                                          …, click the Kit Selector and select a kit for the device.
                                          After checking all the menu items the best fit is: Build -> Open Build and Run Kit Selector
                                          Click that to be rewarded with a popup in the lower left corner. When the snipping tool is clicked the popup closes prohibiting capture. The text is:

                                          The project basiclayouts is not yet configured.
                                          You can configure it in the Projects Mode

                                          Click that link: Projects Mode to get here:
                                          0_1544374513679_pic 3.JPG

                                          In the main panel: Configure Project, as a novice Creator users, I don’t know what to enter in the field: Type to filter kits by name.
                                          Try the top down Import Build from to get the path
                                          C:\QT5\Examples\Qt-5.12.0\widgets\layouts
                                          0_1544374581204_pic 4.JPG

                                          Click the wide pushbutton Import. No response. The button Configure Project is disabled.
                                          Go to the left panel and select Manage Kits and the reward is the Options dialog.

                                          0_1544374640719_pic 5.JPG

                                          This novice is quite unsure of what to do.
                                          As the basic path is to configure kits, go that way.
                                          The Auto-detected looks good. The down arrow only closes it.
                                          There are two options available: the Add button and the OK button.
                                          I presume ( I presume you understand the word presume, grin.) the dialog is correctly configured and select OK.
                                          The window closes with no apparent action taken.

                                          I presume, but only because there is little other choice, that the proper activity was completed. I do suspect that is not the case.

                                          Next step is a guess. The dialog to Manage Kits was taken and apparently completed so click Build.
                                          The only option enabled is:
                                          Build -> Open Build and Run Kit Selector

                                          That is circular. That’s enough here. This will require quite a bit of time to edit into a response.
                                          I stop here to uninstall and re-install with the default location unchanged.
                                          Should I back up to a previous version or use the same version. I suspect that the previous version has a higher probability of success, but that is changing two variables in one step. I will stay with the latest version.

                                          JKSHJ 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