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. Open one Qt app (not as a process) in another Qt app as a dock widget
Forum Updated to NodeBB v4.3 + New Features

Open one Qt app (not as a process) in another Qt app as a dock widget

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 598 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.
  • LoquatL Offline
    LoquatL Offline
    Loquat
    wrote on last edited by
    #1

    Hi there,

    Is it possible to open another Qt app in my current Qt app but not start it as a process with QProcess but as a separate thread?

    Say, for example, open the other app in its own dock widget or MDI, whichever is better for that purpose.

    Since every Qt app is derived from a QWidget, can I pass an app's object from another project to my current app's dock->setWidget(????) for example?

    Would I need to create another project as a DLL and then instantiate that app in my current app so I could use it?

    What's the best solution if it's doable, at all?

    Thanks!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      No, not like that.

      If you want to share classes and logic between several applications, the usual way is to create libraries and reuse them.

      Some projects do that using the subdirs template where all the widgets and business logic are located in one or more libraries and then they are re-used to produce one or more applications. For example a command line tool and a GUI for it.

      KDE's KPart system is another example.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • LoquatL Offline
        LoquatL Offline
        Loquat
        wrote on last edited by
        #3

        Thank you so much for replying so quickly!

        Re/ the subdirs template, I found this: https://wiki.qt.io/SUBDIRS_-_handling_dependencies
        Is that a good reference?

        KParts sounds very intriguing but is it still being worked on or has it been archived and forgotten about?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          It's a bit complex.

          The documentation of the template has improved and should be enough.

          As for the KPart status, I currently can't tell.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • LoquatL Offline
            LoquatL Offline
            Loquat
            wrote on last edited by
            #5

            Okay, so I'll use subdirs template in my host app to SUBDIR another project... how would I then physically start that other project from the host project? What's more, how would I start it as a widget?

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Integrate the main widget directly in your application. So you have a single application.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              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