Bug report #17779

Customization: no way to hide the Locator widget

Added by Borys Jurgiel over 6 years ago. Updated about 5 years ago.

Assignee:Nyall Dawson
Category:Customisation Framework
Affected QGIS version:3.7(master) Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:25675


The Locator Widget is not listed in the QgsCustomizationDialog, as it has no objectName.

After setting its objectName, it's properly included to the tree, however, unticking its checbox is not effective.


#1 Updated by Borys Jurgiel over 6 years ago

  • Regression? set to No
  • Tracker changed from Feature request to Bug report
  • Affected QGIS version set to master
  • Crashes QGIS or corrupts data set to No

Switching to Bug report, as similar deficiencies are reported as bugs.

#2 Updated by Borys Jurgiel over 6 years ago

I have more details. If I set the objectName in qgisapp.cpp:

  mLocatorWidget->setObjectName( QStringLiteral( "mLocatorWidget" ) );

the widget is properly identified and QgsCustomization::updateMainWindow() tries to remove it by calling (qgscustomization.cpp:758):

          sb->removeWidget( widget );

However, this call seems to take no effect.

Furthermore, if I modify inserting the widget and put it to the right:

qgisapp.cpp : 2912
-  mStatusBar->addPermanentWidget( mLocatorWidget, 0, QgsStatusBar::AnchorLeft );
+  mStatusBar->addPermanentWidget( mLocatorWidget, 0 );

The result is strange: qgisapp.cpp successfully places it to the right and then the customization framework moves it to the "normal" (left) position instead of hiding it. IIRC, when I completely commented out the line above, the widget was still visible in the status bar. Is it added in another part of the code? Further investigations needed.

#3 Updated by Borys Jurgiel over 6 years ago

  • Assignee set to Nyall Dawson

Hi Nyall, as you wrote the locator, hopefully it's something trivial for you. Otherwise feel free to reassign it to me and I'll come back to it when I have more time.

#4 Updated by Giovanni Manghi about 5 years ago

  • Status changed from Open to Feedback

Please check if this issue is still valid on QGIS 3.4.5 or 3.6.

#5 Updated by Borys Jurgiel about 5 years ago

  • Affected QGIS version changed from master to 3.7(master)

Yes, still valid.

#6 Updated by Borys Jurgiel about 5 years ago

  • Priority changed from Normal to Low

Also available in: Atom PDF