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. How to see my QT UI when I'm developing a QT Dynamic Library with GUI?
Forum Updated to NodeBB v4.3 + New Features

How to see my QT UI when I'm developing a QT Dynamic Library with GUI?

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 408 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.
  • F Offline
    F Offline
    fem_dev
    wrote on last edited by
    #1

    Hi, I'm trying to develop a QT cross-platform dynamic library (.dll and .so) that contains QT UI inside of it (window, buttons, labels, etc...). So, when the "main application" calls this library, a new QT window opens in the GUI.

    To do this, I created a QT dynamic library project, I put my code and draw my UI in it.
    It compiles Ok! And I got the output file: Windows (*.dll) and Linux (.so).

    But when I click in the "Run" QT Creator button this project cannot launch. I understand this, because the output file of this project is not a binary application....it is only a dynamic library.

    So I'm doing a "blind developing" process. I can't see the UI final result of my QT dynamic library.

    How can I setup the QT Creator to be able to test and see this UI running in this special case?

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @fem_dev said in How to see my QT UI when I'm developing a QT Dynamic Library with GUI?:

      How can I setup the QT Creator to be able to test and see this UI running in this special case?

      Create a separate executable which links to your library and run this.

      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
      1
      • F Offline
        F Offline
        fem_dev
        wrote on last edited by
        #3

        @christian-ehrlicher did you mean add the main application in the LIBS configuration?

        LIBS += "path_to_the_main_application.exe"
        

        That's it?

        aha_1980A 1 Reply Last reply
        0
        • F fem_dev

          @christian-ehrlicher did you mean add the main application in the LIBS configuration?

          LIBS += "path_to_the_main_application.exe"
          

          That's it?

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi @fem_dev,

          no, you need two projects: one for your lib, and one for your app.

          You can combine both in a SUBDIRS project, though: https://wiki.qt.io/SUBDIRS_-_handling_dependencies

          Regards

          Qt has to stay free or it will die.

          F 1 Reply Last reply
          4
          • aha_1980A aha_1980

            Hi @fem_dev,

            no, you need two projects: one for your lib, and one for your app.

            You can combine both in a SUBDIRS project, though: https://wiki.qt.io/SUBDIRS_-_handling_dependencies

            Regards

            F Offline
            F Offline
            fem_dev
            wrote on last edited by
            #5

            @aha_1980 thank you! Perfect!

            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