Uploaded image for project: 'Qt Visual Studio Tools'
  1. Qt Visual Studio Tools
  2. QTVSADDINBUG-1162

Cannot use Qt Quick Application with Qt 5 and CMake

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 3.2.0
    • 3.0.2, 3.1.0 (rev.02)
    • General
    • Windows 11 23H2
      MSVS2022
    • 24dd1df6a (dev), 899d3e090 (dev)

    Description

      1. Configure the Qt VS Tools to use Qt 5.
        I used Qt 5.15.16 x64 from the official Online Installer.
      2. Create a new CMake-based Qt Quick Application project using the wizard.
        CMake generation fails:
        Severity	Code	Description	Project	File	Line	Suppression State	Details
        Error		CMake Error at QtQuickApplication10/qt.cmake:14 (add_executable):
          Cannot find source file:
        
            qml.qrc
        
          Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm
          .ccm .cxxm .c++m .h .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90
          .f95 .f03 .hip .ispc		D:\tmp\msvs\QtQuickApplication10\QtQuickApplication10/qt.cmake	14		
        

        That source file is not there, indeed.

      With Qt 6.6.1, creating and building such a project works fine.

      Found when extending Squish test tst_new_project_file_creation.

      Attachments

        For Gerrit Dashboard: QTVSADDINBUG-1162
        # Subject Branch Project Status CR V

        Activity

          People

            ali.demiralp Ali Can Demiralp
            rlohning Robert Löhning
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes