File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ def __init__(
1919 about_dialog_cls = None ,
2020 settings_plugin_name = None ,
2121 icon = None ,
22+ title = None ,
2223 ):
2324 """Constructor.
2425
@@ -38,6 +39,9 @@ def __init__(
3839 :param icon: Optional path to the plugin icon.
3940 Defaults to the bundled ``oqtopus-logo.png``.
4041 :type icon: str | None
42+ :param title: Optional title for the main dialog window.
43+ Defaults to the UI file's window title.
44+ :type title: str | None
4145 """
4246 # Save reference to the QGIS interface
4347 self .iface = iface
@@ -48,6 +52,7 @@ def __init__(
4852 self ._about_dialog_cls = about_dialog_cls or AboutDialog
4953 self ._settings_plugin_name = settings_plugin_name
5054 self ._icon = icon or PluginUtils .get_plugin_icon_path ("oqtopus-logo.png" )
55+ self ._title = title
5156
5257 self .__version__ = PluginUtils .get_plugin_version ()
5358
@@ -207,6 +212,8 @@ def show_main_dialog(self):
207212 about_dialog_cls = self ._about_dialog_cls ,
208213 parent = self .iface .mainWindow (),
209214 )
215+ if self ._title :
216+ main_dialog .setWindowTitle (self ._title )
210217 main_dialog .exec ()
211218
212219 def show_logs_folder (self ):
You can’t perform that action at this time.
0 commit comments