M
M
maaGames2022-02-04 12:53:12
Qt
maaGames, 2022-02-04 12:53:12

Modeless dialog without QApplication?

There is an application written in any language. For the application, add-ons are supported in the form of a dll with a C interface (also in any language). In fact, the entire dll connection occurs through a single function call:
extern "C" __declspec( dllexport ) void * init(char* interface_name );

This function should return control as soon as possible.

I need to create a modeless dialog. How to do it correctly without QApplication.exec()?
For now, I assume that the init function should start a thread in which the dialog will be created and a QEventLoop to handle events from the dialog. The dialog will receive and pass data through application functions (imported C functions), Qt will not be used for this. Qt is only needed to read/write Json files and display the dialog and its subdialogs.

How to do it right?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Armenian Radio, 2022-02-04
@maaGames

It's literally impossible. Any interaction with the GUI in Qt requires the creation of an instance of QApplication.
Because in view of the complex architecture and heaps of abstractions, even for simple drawing of windows, you need to launch the plugin subsystem and load the plugin for Windows.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question