Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Embed a project into another.

Embed a project into another.

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.2k Views 1 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.
  • mrdebugM Offline
    mrdebugM Offline
    mrdebug
    wrote on last edited by
    #1

    Hi. I have a main and a secondary qt project.
    The secondary project has a form created from main.cpp.
    Is there a way for embed the form of the second peoject into the main project?

    Need programmers to hire?
    www.labcsp.com
    www.denisgottardello.it
    GMT+1
    Skype: mrdebug

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

      Yes. Just include the header and add it to your QLayout in main. You can also use qmake subdirs template.

      (Z(:^

      1 Reply Last reply
      0
      • mrdebugM Offline
        mrdebugM Offline
        mrdebug
        wrote on last edited by
        #3

        I'm not sure to have understood correctly. I have copied the sources of the secondary project in the folder of the main project.
        Can you explain step by step the right way to embed in a standard main qt project a secondary standard qt project?

        Need programmers to hire?
        www.labcsp.com
        www.denisgottardello.it
        GMT+1
        Skype: mrdebug

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

          There is no standard way, as such. Depends on what you want to achieve and how you want to achieve it.

          If what you want is to use a widget created in project A inside project B, then you need to add it to project B (add files to .pro, include headers in source code), instantiate the widget and add it to layout.

          If you want to have 2 projects grouped together (for example, a library and dependent application), you can use qmake subdirs template and specify path to subdirs in main .pro file.

          (Z(:^

          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