[vlmc-devel] MainWindow: Set objectName of dockWidget(s)
Yikai Lu
git at videolan.org
Sat Apr 30 19:10:20 CEST 2016
vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Fri Apr 29 17:05:44 2016 +0900| [bcc5d44e9f6dedf1442502a84b344c82b87380f5] | committer: Hugo Beauzée-Luyssen
MainWindow: Set objectName of dockWidget(s)
When we want to call QMainWindow::saveState(), we have to ensure the following:
"The objectName property is used to identify each QToolBar and QDockWidget. You should make sure that this property is unique for each QToolBar and QDockWidget you add to the QMainWindow"
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> https://code.videolan.org/videolan/vlmc/commit/bcc5d44e9f6dedf1442502a84b344c82b87380f5
---
src/Gui/MainWindow.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp
index 3f3a895..fb6be8a 100644
--- a/src/Gui/MainWindow.cpp
+++ b/src/Gui/MainWindow.cpp
@@ -649,6 +649,7 @@ MainWindow::dockWidget( QWidget* widget, Qt::DockWidgetArea startArea )
dock->setAllowedAreas( Qt::AllDockWidgetAreas );
widget->setParent( dock );
dock->setWidget( widget );
+ dock->setObjectName( widget->objectName() );
addDockWidget( startArea, dock );
registerWidgetInWindowMenu( dock );
return dock;
More information about the Vlmc-devel
mailing list