I am creating a dock widget for my plugin and i want my widget to be fixed to the Qgis window. How can i do that using python programming?
[GIS] How to i fix the dock widget to the the Qgis window using python
pyqtqgis
pyqtqgis
I am creating a dock widget for my plugin and i want my widget to be fixed to the Qgis window. How can i do that using python programming?
Best Answer
This question is perhaps better suited to StackOverflow, as it doesn't specifically relate to GIS (other than that the application you're using is QGIS).
To create a new dock widget and add it to the left panel:
If the user moves it to a floating window you can then re-dock it using
setFloating
:If you want to prevent the user from moving it to a floating window you need to set the "features" of the widget. In the example below, the widget is movable and closable, but not floatable: