Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. MSVC2017 kit, could not find <QApplication> in debug mode, but profile and release are OK?
Qt 6.12 LTS is out! See what's new in the release blog

MSVC2017 kit, could not find <QApplication> in debug mode, but profile and release are OK?

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 1.2k 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.
  • J Offline
    J Offline
    Jerry.Wilson
    wrote on last edited by
    #1

    Hi, everyone.
    I'm a newbie , Installed QT 5.11, QT Creator 4.7.0. Then I tried to write a HelloWorld,kit MinGW works fine, then I switched to MSVC2017 kit, in debug mode it shows "<QApplication>: No such file or directory", but when I changed it to profile mode or release mode, It worked fine , so what happened?

    pro file:
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    QT += core gui widgets

    SOURCES +=
    main.cpp

    and the main.cpp file:
    #include <QApplication>
    #include <QDialog>
    #include <QLabel>

    int main(int argc, char *argv[])
    {
    QApplication app(argc,argv);
    QDialog w;
    QLabel label(&w);
    label.setText("1");
    w.show();
    return app.exec();
    }

    jsulmJ 1 Reply Last reply
    0
    • J Jerry.Wilson

      Hi, everyone.
      I'm a newbie , Installed QT 5.11, QT Creator 4.7.0. Then I tried to write a HelloWorld,kit MinGW works fine, then I switched to MSVC2017 kit, in debug mode it shows "<QApplication>: No such file or directory", but when I changed it to profile mode or release mode, It worked fine , so what happened?

      pro file:
      greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
      QT += core gui widgets

      SOURCES +=
      main.cpp

      and the main.cpp file:
      #include <QApplication>
      #include <QDialog>
      #include <QLabel>

      int main(int argc, char *argv[])
      {
      QApplication app(argc,argv);
      QDialog w;
      QLabel label(&w);
      label.setText("1");
      w.show();
      return app.exec();
      }

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

      @Jerry.Wilson You didn't mention whether you installed Qt for MSVC2017, did you? After switching to a different Kit you should do a complete rebuild (in case of errors delete the build directory, run qmake and build).

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

      J 1 Reply Last reply
      1
      • jsulmJ jsulm

        @Jerry.Wilson You didn't mention whether you installed Qt for MSVC2017, did you? After switching to a different Kit you should do a complete rebuild (in case of errors delete the build directory, run qmake and build).

        J Offline
        J Offline
        Jerry.Wilson
        wrote on last edited by
        #3

        @jsulm Thank you for replying, I installed QT for MSVC2017, and I did "Clean all" then rebuilt the project after switched to MSVC2017 kit that time.

        But just a moment ago after lunch I restart the QT Creator. the problem disappeared just like it never happened...

        Thanks again and sorry for my poor English.

        jsulmJ 1 Reply Last reply
        0
        • J Jerry.Wilson

          @jsulm Thank you for replying, I installed QT for MSVC2017, and I did "Clean all" then rebuilt the project after switched to MSVC2017 kit that time.

          But just a moment ago after lunch I restart the QT Creator. the problem disappeared just like it never happened...

          Thanks again and sorry for my poor English.

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

          @Jerry.Wilson Strange, don't know what it was, bud glad it works now!

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

          J 1 Reply Last reply
          0
          • jsulmJ jsulm

            @Jerry.Wilson Strange, don't know what it was, bud glad it works now!

            J Offline
            J Offline
            Jerry.Wilson
            wrote on last edited by
            #5

            @jsulm Maybe the Creator was hungry ...::P

            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
            • Unsolved