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. How to turn two projects into one
Qt 6.11 is out! See what's new in the release blog

How to turn two projects into one

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
2 Posts 2 Posters 489 Views 2 Watching
  • 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.
  • O Offline
    O Offline
    OpenGL
    wrote on last edited by
    #1

    I started out with two projects (running two separate qt creators with projects in separate directories) and now I start to have some code duplicated and want to have only one project. Is that possible, and if so, how do I make it into one project?

    I guess the key thing would be to make a new .pro file (move the source code and change the name of some files is the easy part)

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Look into SUBDIRS. It allows you to create multiple libraries (for shared code) and executables in a single project.

      However, since you're about to rewrite your build system files anyway, I highly recommend moving away from qmake and to use cmake for this. Cmake syntax is horrible but it makes managing more complex projects much easier.

      (Z(:^

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