Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
573 views
in Technique[技术] by (71.8m points)

qt - Problems with Multiple QApplications

Can someone help me understand what are the problems in running multiple QApplications on Qt for Embedded Linux? Please point me to some documentation of mailing-list threads.

While going through some of the mails in mailing lists, I have seen some comments which say that, running multiple QApplications in Qt is not supported by design and why at all it is required? How can I understand this more clearly?

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

I am executing two QApplications on a Embedded Linux platform (not a PC) and one of them in full screen mode. The one which is in fullScreen mode it is not getting keyboard focus, even though it receives mousePress events. If same app is run in normalMode, it gets the mousePress event followed by focusInEvent`.

Can somebody provide pointers on it?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...