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.6k 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.
  • aha_1980A aha_1980

    @BKBK

    • doed the error disappear when you press compile?
    • do you have CONFIG+= GUI WIDGETS QT += widgets in your pro file? [EDIT: Fixed options --JKSH]
    • do you really want to build UWP apps or classic Windows applications?
    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by JKSH
    #3

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

    do you have CONFIG+= GUI WIDGETS in your pro file?

    Actually

    QT += core gui

    QT += widgets
    

    should be enough for a widget application. [EDIT: Fixed options --JKSH]

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

    aha_1980A 1 Reply Last reply
    0
    • jsulmJ jsulm

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

      do you have CONFIG+= GUI WIDGETS in your pro file?

      Actually

      QT += core gui

      QT += widgets
      

      should be enough for a widget application. [EDIT: Fixed options --JKSH]

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

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

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

      do you have CONFIG+= GUI WIDGETS in your pro file?

      Actually

      QT += core gui
      

      should be enough for a widget application.

      Not in Qt5 ;)

      Qt has to stay free or it will die.

      jsulmJ 1 Reply Last reply
      0
      • aha_1980A aha_1980

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

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

        do you have CONFIG+= GUI WIDGETS in your pro file?

        Actually

        QT += core gui
        

        should be enough for a widget application.

        Not in Qt5 ;)

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

        @aha_1980 Sorry, you're right

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

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

          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.

          jsulmJ JKSHJ 2 Replies 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.

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

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

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

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

              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 didn't detect the two different installs. If you can, please redirect me to a site that describes all the options and which ones are needed for a basic windows install. I will search when I get home from work but that will be a while.

              Side question: I access the internet through government firewalls at work and they block many things. At home this forum provides options not present at work, such as bolding, italics, and an icon with the characters "</>" that works for quoting code. I tried editing in several standard phrases such as:
              [CODE] line of code [/CODE]
              but the ones I attempted were not successful. If you know, please advise me of the character strings that will identify quotes and code causing them to be more obvious in our posts.

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

                Hi,

                It's not CONFIG but QT += widgets that your need.

                As for the code format it's three backticks, start a new line, then again three backticks on a new line.

                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
                  #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

                                          • Login

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