Is it possible to set the default dock position for the attribute table? I have a pretty long list of fields and 1-N relations to be displayed. Now I need to always drag and drop the window and I was wondering if it is possible to avoid it and have it always on the right.
1 Answer
I don't think there is an option for this yet. But you can make a simple tool which opens the table on the right. Run the script in QGIS Python Editor. It adds a toolbar containing a tool.
def open_attr_table_on_the_right():
attr_table = iface.showAttributeTable(iface.activeLayer())
widgets = QApplication.instance().allWidgets()
attrTables = [t for t in widgets if t.objectName() == u'AttributeTable']
for table in attrTables:
iface.addDockWidget(Qt.RightDockWidgetArea, table)
action = QAction("Open A.T.")
action.triggered.connect(open_attr_table_on_the_right)
new_toolbar = iface.addToolBar("Open Attribute Table")
new_toolbar.addAction(action)
This script displays a newly opened table on the right and moves other attribute tables already opened to the right.