Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.7.1, 5.11.1
-
None
-
Debian Stretch with KDE using distribution provided Qt 5.7.1 and Qt 5.11.1 installed by Qt installer
Description
To reproduce the bug setup a QWidget project and add a QDockWidget to the mainwindow.
Undock and dock the widget a few times and click randomly on the titlebars of the widget and the mainwindow. Now sometimes when the QDockWidget is clicked while floating the focus directly jumps to the mainwindow. This makes it impossible to edit anything inside the QDockWidget while floating.
Docking and undocking it again may fix or start the problem (or having no effect).
The problem occurs under Debian Strecht with KDE with the Qt version shipped by the distribution and also with Qt 5.11.1 (I have not tested other versions)
On Windows 7 I could not reproduce the bug (Qt 5.11.1 tested).
Here is some simple example where it is not possible to edit the QLineEdit when the focus problem occurs.
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); // Dockwidget with LineEdit QDockWidget* dockWidget = new QDockWidget(this); dockWidget->setWidget(new QLineEdit(dockWidget)); }