Problems with Multiple QApplications

Can someone help me understand what are the problems when running multiple QApplication in Qt for embedded Linux? Please provide me with documentation on mailing streams.

When I looked at some of the letters on the mailing lists, I saw a few comments that say that running multiple QApplication in Qt is not supported by the design and why is it required at all? How can I understand this more clearly?

However, while reading the Qt for Linux Embedded Architecture document, I did not find anything that suggests that we should not run multiple QApplication instances QApplication the same time.

I run two QApplication on the Embedded Linux platform (and not on a PC) and one of them is in full screen. One that is in fullScreen mode does not receive keyboard focus, even if it accepts mousePress events. If the same application is running in normalMode , it receives a mousePress event, followed by focusInEvent`.

Can anyone provide pointers to it?

+4
source share
3 answers

You can run multiple processes each with one QApplication just fine.

However, with Qt for embedded Linux, only one of them must be a QWS server. In other words, you must start the first process with `-qws' and all other processes.

+3
source

QApplication is a singleton class, so its "single" in design. You can have only one QApplication object for each program.

But in Qt, there is no built-in limit on the number of qt programs using the QApplication class, which you can execute in parallel. At the same time, you can have more than one program using qt (and therefore very likely QApplication).

This is probably a little confused on your mailing lists.

+2
source

I assume that one QApplication will receive a mouse event or keyboard event, and therefore the other will not receive it.

It is probably a bit random regarding what QApplication accepts, which events are based on the fact that there are so many QApplications in QOpplications.

I cannot imagine to use the case where you want to use multiple QApplications inside a process. Could you expand what you are trying to do?

0
source

All Articles