Solved How to see my QT UI when I'm developing a QT Dynamic Library with GUI?
-
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?
-
@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.
-
@christian-ehrlicher did you mean add the main application in the LIBS configuration?
LIBS += "path_to_the_main_application.exe"
That's it?
-
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_dependenciesRegards
-
@aha_1980 thank you! Perfect!