Results 1 to 6 of 6

Thread: No ".pro" file--how to add modules in QtCreator, qt6?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2012
    Posts
    219
    Thanks
    28
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default No ".pro" file--how to add modules in QtCreator, qt6?

    Long time qt developer, but just now moving up to 6.4 and qtcreator 9.

    I can build an example, but I'm thinking about how I will move my legacy apps to the new build environment.

    Most of them required adding something like QT += module name.

    Also, additional libraries to link, target name, etc.

    So, I think cmake is now used for that?

    Is there a resource to understand how to use cmake to do the things that used be done with qmake? Can I use qmake instead?

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: No ".pro" file--how to add modules in QtCreator, qt6?

    There is documentation from Qt as well as tutorial videos from KDAB and others, including some for creating CMake projects for cross-platform compilation and cross-platform compilation for RPi.

    It is well worth moving to CMake for builds. For basic projects, it is very straightforward and many things are just built in - like adding Qt to a project.

    If you are serious about learning how to use CMake for large or complex builds, I would recommend two books: Modern CMake for C++ by Rafal Swidzinski and CMake Cookbook by Radovan Bast and Roberto Di Remigio. Kitware also has their own book, Mastering CMake by Ken Martin and Bill Hoffman.

    The first book is a textbook which goes from first principles and builds to more complex project configuration and management. The second book is (as the title implies) a set of recipes for accomplishing specific tasks with CMake. The third is a distillation of the online CMake documentation into reference book form. What is good about it is that it explains in detail what all of the many, many commands, variables, and options in CMake mean and how and when they are used.

    CMake is an incredibly powerful system, not just for builds but for complete project management - everything from source code control to generating documentation. I've used it to create a build system that builds a complete software development toolkit, consisting of dozens of projects, static and dynamic libraries, with a mix of C++, C, and C#. Probably close to a million lines of code spread over several thousand source code files. From one CMakelist hierarchy, it could build or cross-compile for 4 Windows distributions (debug and release, VS9 and VS10), 2 MacOS distributions, linux, and Android. Not all projects could be built for each configuration, and CMake handles that with conditionals.
    Last edited by d_stranz; 21st January 2023 at 16:35.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. The following user says thank you to d_stranz for this useful post:

    davethomaspilot (21st January 2023)

Similar Threads

  1. Replies: 5
    Last Post: 10th April 2013, 11:20
  2. Custom Qt "modules" from within a main QApplication
    By alitoh in forum Qt Programming
    Replies: 2
    Last Post: 27th July 2012, 14:00
  3. Replies: 3
    Last Post: 15th February 2010, 17:27
  4. Replies: 3
    Last Post: 8th July 2008, 19:37
  5. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 19:05

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.