I want to open QGIS options dialog (menu Settings > Options) programmatically and focus a specific tab.

I saw the QgisInterface.showOptionsDialog class method description :

virtual void QgisInterface::showOptionsDialog ( QWidget * parent = nullptr, const QString & currentPage = QString() )

Opens the options dialog.

The currentPage argument can be used to force the dialog to open at a specific page.

but I don't know which value enter for currentPage.

1 Answer 1


With QGIS code source investigation, the currentPage values are the Qt object names of the options dialog page widgets.

So, the QGIS options dialog can be opened at specific tabs with :

page_names = [
# to open options dialog on the general tab

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.