qtqt-creator

Cannot find .pro file in Qt Creator


I'm new to Qt, learning through a Qt Creator tutorial. I am trying to connect Qt with a MySQL database. To do so, I have to modify a .pro file adding the command QT += core sql

However, once I create a project there is no .pro file in the menu, only the .ccp file.

Program installed: Qt Creator 4.13.0

OS: Windows 10 x64

Steps followed:

  1. Choose New Project

  2. Choose Qt Console Application

  3. Build system: CMake

  4. Kits: I have some available; I am using Qt 5.15.1 MSVC2019 64bit

The menu displayed shows a CMakesList.txt file, and the main.ccp source file. However no .pro file is created.


Solution

  • For new build system you should modify CMakeList.txt file.

    Please try to replace

    target_link_libraries(myapp Qt5::Gui)
    

    with

    target_link_libraries(myapp Qt5::Gui Qt5::Sql)