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. QMainWindow file not found

QMainWindow file not found

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 2 Posters 3.4k 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.
  • Y Offline
    Y Offline
    Yi-Fan
    wrote on last edited by
    #1

    Hi. I'm not sure if this is the correct category of this topic, but I'm in a hurry wondering how to solve this problem. Since I've searched and tried many possible solutions provided from past questions and still failed, I appreciate everyone who provides new solution or tell me where I made mistakes.
    Here's my .pro file and the debug message.
    0_1497164674790_螢幕快照 2017-06-11 下午3.04.10.png
    Thanks a lot!

    1 Reply Last reply
    0
    • EddyE Offline
      EddyE Offline
      Eddy
      wrote on last edited by
      #2

      Hi Yi-Fan and welcome to the Qt forum,

      Do you notice the difference between line 7 and 8 :
      QT versus Qt. It should be QT there.

      line 8 is even not needed since it's already in line 10, which tells us : if your Qt version is greater than 4 than add the module widgets.

      Qt Certified Specialist
      www.edalsolutions.be

      Y 1 Reply Last reply
      1
      • EddyE Eddy

        Hi Yi-Fan and welcome to the Qt forum,

        Do you notice the difference between line 7 and 8 :
        QT versus Qt. It should be QT there.

        line 8 is even not needed since it's already in line 10, which tells us : if your Qt version is greater than 4 than add the module widgets.

        Y Offline
        Y Offline
        Yi-Fan
        wrote on last edited by
        #3

        @Eddy Thanks for replying!
        This solution is one of which I've viewed in other questions.
        However, even I turn 't' into 'T' now, it still shows the same messages.

        1 Reply Last reply
        0
        • Y Offline
          Y Offline
          Yi-Fan
          wrote on last edited by
          #4

          I suspect the directory of the header file is the problem.
          I install the application on a portable external hard drive. Shall I change any setting to let IDE know where is the correct directory?

          EddyE 1 Reply Last reply
          0
          • EddyE Offline
            EddyE Offline
            Eddy
            wrote on last edited by Eddy
            #5

            Do you have #include "mainwindow.h" in you main.cpp file.

            As I can see you are using a Qt wizard to make a QMainwindow based test application. This should work out of the box. What did you change?

            A good way to start learning is to start from the wizard, build and run, make some more changes and run again. If you made mistakes, you will know immediately what you have done.

            Qt Certified Specialist
            www.edalsolutions.be

            1 Reply Last reply
            2
            • Y Yi-Fan

              I suspect the directory of the header file is the problem.
              I install the application on a portable external hard drive. Shall I change any setting to let IDE know where is the correct directory?

              EddyE Offline
              EddyE Offline
              Eddy
              wrote on last edited by
              #6

              @Yi-Fan said in QMainWindow file not found:

              I suspect the directory of the header file is the problem.
              I install the application on a portable external hard drive. Shall I change any setting to let IDE know where is the correct directory?

              Can you elaborate on you setup? otherwise we will be guessing for a long time what is going on.
              What OS are you on, what kits did you use, what version of Qt (I suspect 5.9)....

              Qt Certified Specialist
              www.edalsolutions.be

              Y 1 Reply Last reply
              2
              • EddyE Eddy

                @Yi-Fan said in QMainWindow file not found:

                I suspect the directory of the header file is the problem.
                I install the application on a portable external hard drive. Shall I change any setting to let IDE know where is the correct directory?

                Can you elaborate on you setup? otherwise we will be guessing for a long time what is going on.
                What OS are you on, what kits did you use, what version of Qt (I suspect 5.9)....

                Y Offline
                Y Offline
                Yi-Fan
                wrote on last edited by Yi-Fan
                #7

                @Eddy I'm using mac OS X 10.11.6, and Qt 5.9.
                The kit is Desktop Qt 5.9.0 clang 64 bits

                1 Reply Last reply
                0
                • EddyE Offline
                  EddyE Offline
                  Eddy
                  wrote on last edited by Eddy
                  #8

                  @Yi-Fan
                  I would recommend to take some time to read the Qt Creator Manual - getting started It's a good read and you will feel much more confident in this new environment later on.

                  If you will follow that link, you will encounter also the location of kits.

                  Qt Certified Specialist
                  www.edalsolutions.be

                  1 Reply Last reply
                  2

                  • Login

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