Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Difference between .pro and CMakeLists.txt
Forum Updated to NodeBB v4.3 + New Features

Difference between .pro and CMakeLists.txt

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
5 Posts 2 Posters 1.7k 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.
  • U Offline
    U Offline
    Uberlinc
    wrote on last edited by Uberlinc
    #1

    Hi,

    Just getting used to Qt.
    So, I've been coding away on something and there are Headers, footers and forms.
    Above these (below the Project name) is a .pro file.

    So, when I go to create a new Qt Widgets application, instead of following the format as above, there is:
    MainWindow class
    mainwindow.h,
    mainwindow.cpp
    mainwindow.ui.

    There is not, however, a Projectname.pro.
    Instead there's a CMakeLists.txt file.
    Also, when I try to add another form, it seems to exist somewhere but doesn't show in the project list and I can't edit it.

    Also, there is a sub-folder in the Project Explorer of "CMake Modules" that is not present in my other projects.

    Did I somehow select something different when I created this project?

    Thanks,

    Uberlinc

    Christian EhrlicherC 1 Reply Last reply
    2
    • U Uberlinc

      Hi,

      Just getting used to Qt.
      So, I've been coding away on something and there are Headers, footers and forms.
      Above these (below the Project name) is a .pro file.

      So, when I go to create a new Qt Widgets application, instead of following the format as above, there is:
      MainWindow class
      mainwindow.h,
      mainwindow.cpp
      mainwindow.ui.

      There is not, however, a Projectname.pro.
      Instead there's a CMakeLists.txt file.
      Also, when I try to add another form, it seems to exist somewhere but doesn't show in the project list and I can't edit it.

      Also, there is a sub-folder in the Project Explorer of "CMake Modules" that is not present in my other projects.

      Did I somehow select something different when I created this project?

      Thanks,

      Uberlinc

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Uberlinc said in Difference between .pro and CMakeLists.txt:

      Did I somehow select something different when I created this project?

      You're using Qt6 which switched from qmake to cmake and therefore now there is a CMakeLists.txt instead a pro-file.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      2
      • U Offline
        U Offline
        Uberlinc
        wrote on last edited by
        #3

        Ah!
        That explains it!

        So, then what do I do that's different?

        I am trying to do a simple second window application.
        When I add a new Qt Designer Form Class, it doesn't add the new files in the Project Explorer.
        Is there something else I'm meant to do?

        Thanks.

        Christian EhrlicherC 1 Reply Last reply
        0
        • U Uberlinc

          Ah!
          That explains it!

          So, then what do I do that's different?

          I am trying to do a simple second window application.
          When I add a new Qt Designer Form Class, it doesn't add the new files in the Project Explorer.
          Is there something else I'm meant to do?

          Thanks.

          Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Uberlinc said in Difference between .pro and CMakeLists.txt:

          Is there something else I'm meant to do?

          You have to add it by yourself to the CMakeLists.txt

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          0
          • U Offline
            U Offline
            Uberlinc
            wrote on last edited by
            #5

            Okay!
            That's sorted it!
            Many thanks.

            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