V
V
Vitaly2015-02-05 11:25:47
Qt
Vitaly, 2015-02-05 11:25:47

How is a focusless QDockWidget implemented?

There is a Qt5 application that uses a QMainWindow and a ton of QDockWidgets as auxiliary toolbars and settings windows.
Question: how to make them non-activated, i.e. To keep focus on the main window? Like, for example, the palette in Paint.NET: no matter how much you poke and drag it, the focus remains on the main window.
Each widget is a separate class, so there is no difficulty in adding and changing them (For example, substituting virtual functions).
I myself work on Windows but at the same time debug the same code under Linux (CentOS, Debian and Mint) and Mac.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DancingOnWater, 2015-02-05
@DancingOnWater

Watson, well, watson ....
We take QMainWindow and filter QFocusEvent, setting a filter or overriding the appropriate method

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question