Is it possible to dock the attribute table using pyqgis? For instance, docking it to the bottom of the screen?
2 Answers 2
There is the setting Open attribute table in a dock window
which automatically opens the attribute table in the bottom dock window. You can set this manually via the menubar:
Settings > Options > Data Sources > Open attribute table in a dock window
Or via PyQGIS:
from PyQt4.QtCore import QSettings
QSettings().setValue("/Qgis/dockAttributeTable", True)
-
@KasperSkjeggestad - Most welcome! Glad it helped :)Joseph– Joseph2018年05月03日 13:43:21 +00:00Commented May 3, 2018 at 13:43
To do this in Qgis 3.x (expanding on the accepted answer by @Joseph), use:
from qgis.PyQt.QtCore import QSettings
QSettings().setValue("/Qgis/dockAttributeTable", True)
# And to check the current value of the setting
QSettings().value("/Qgis/dockAttributeTable")
Explore related questions
See similar questions with these tags.
Qt.RightDockWidgetArea
withQt.BottomDockWidgetArea
:)