Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
6.9.0
-
None
-
{{kinfo}} returns:
{quote}{code:yaml}
Operating System: Fedora Linux 42
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.13.0
Qt Version: 6.9.0
Kernel Version: 6.14.5-300.fc42.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 7600X 6-Core Processor
Memory: 30.4 GiB of RAM
Graphics Processor 1: AMD Radeon RX 5700
Graphics Processor 2: AMD Radeon Graphics
Manufacturer: ASRock
Product Name: X670E Taichi
{code}{quote}{{kinfo}} returns: {quote}{code:yaml} Operating System: Fedora Linux 42 KDE Plasma Version: 6.3.5 KDE Frameworks Version: 6.13.0 Qt Version: 6.9.0 Kernel Version: 6.14.5-300.fc42.x86_64 (64-bit) Graphics Platform: Wayland Processors: 12 × AMD Ryzen 5 7600X 6-Core Processor Memory: 30.4 GiB of RAM Graphics Processor 1: AMD Radeon RX 5700 Graphics Processor 2: AMD Radeon Graphics Manufacturer: ASRock Product Name: X670E Taichi {code}{quote}
Description
Undocking a QDockWidget embedded inside an MdiSubWindow causes the QDockWidget to be unmovable, and subsequently impossible to re-embed (yet the button remains clickable).
Reproduction
#include <QApplication> #include <QMainWindow> #include <QMdiArea> #include <QMdiSubWindow> #include <QDockWidget> #include <QLabel> #include <QVBoxLayout> class MinimalMdiDockApp : public QMainWindow { public: MinimalMdiDockApp(QWidget *parent = nullptr) : QMainWindow(parent) { setWindowTitle("Minimal QMdiArea with QDockWidget Inside Sub-Window"); resize(800, 600); // Create QMdiArea and set it as central widget QMdiArea *mdiArea = new QMdiArea(this); setCentralWidget(mdiArea); // Create QMdiSubWindow QMdiSubWindow *subWindow = new QMdiSubWindow; subWindow->setWindowTitle("Sub-Window with Dock Widget"); // Create QDockWidget, parented to subWindow QDockWidget *dockWidget = new QDockWidget("Internal Dock", subWindow); dockWidget->setFeatures( QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable ); // Create content for the dock QLabel *dockContent = new QLabel("This is supposed to be a dock!"); dockContent->setAlignment(Qt::AlignCenter); dockWidget->setWidget(dockContent); // Set QDockWidget directly as the widget of the subwindow subWindow->setWidget(dockWidget); // Add subwindow to mdi area mdiArea->addSubWindow(subWindow); subWindow->show(); } }; int main(int argc, char *argv[]) { QApplication app(argc, argv); MinimalMdiDockApp window; window.show(); return app.exec(); }
Unable to find source-code formatter for language: pro. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
QT += widgets CONFIG += c++17 console CONFIG -= app_bundle # Only needed on macOS to avoid .app packaging TARGET = MinimalMdiDockApp TEMPLATE = app SOURCES += main.cpp