Hot answers tagged

12 votes
Accepted

QGIS plugin creating the Duplicates tool bars why?

Within unload method, you must add del self.toolbar. def unload(self): """Removes the plugin menu item and icon from QGIS GUI.""" for action in self.actions: ...
user avatar
10 votes
Accepted

How to group my plugins in QGIS menu and toolbar?

Use the findChild method of QGIS mainWindow to know if there is a QToolBar called u'MyProcessing' and get it. If you don't get anything, create it. myToolBar = iface.mainWindow().findChild( QToolBar, ...
user avatar
10 votes
Accepted

QGIS plugin builder puts icon in different toolbars depending on plugin template selected

Using Plugin builder version 3.2.1 I found differences. In case of Tool button with dialog in add_action function addToolBarIcon is used (line 148): self.iface.addToolBarIcon(action) which "Add an ...
user avatar
  • 6,722
9 votes

Getting back to side bar after detaching layer panel in QGIS

Double-clicking the title bar of floating windows on MacOS will maximize the floating window instead of docking it. I tried dragging the floating window to the approximate location of where the panel ...
user avatar
  • 281
7 votes
Accepted

How can I move the toolbar if its holder is out of screen?

In Plugins > Python Console, try typing the following: qgis.utils.iface.layerToolBar().move(5,5) It should move the toolbar shown in your image. Hope this helps!
user avatar
  • 72.2k
7 votes
Accepted

Changing the icon picture on a custom toolbar button

You have to add any external resources including the icons in the resources.qrc file. resources.qrc = The .xml document created by Qt Designer. Contains relative paths to resources of the forms. ...
user avatar
  • 2,835
7 votes
Accepted

Purpose of "No action selected" toolbar button?

As the documentation on the QGIS Website this is the Actions identify tool First you need to set an action to perform: Here is some actions setup (via right click on the layer properties): Here is ...
user avatar
  • 48.5k
7 votes
Accepted

Adding custom toolbar icons in PyQGIS

iface.addToolBarIcon method adds an icon to the Plugins toolbar. It doesn't add the icon to the toolbar area. You should open Plugins toolbar. (3rd one is Show Time icon in the image)
user avatar
6 votes

Making QGIS buttons and my Plugin button mutually exclusive

You can access QGIS toolbar buttons (actions) by using the iface object (docs here). From those actions you can create a QActionGroup and add your custom action making all actions mutually exclusive. ...
user avatar
6 votes
Accepted

QGIS Processing modeler not showing toolbar

You should right-click on a place somewhere near Variable Window (in your screenshot) and a window appears like in the image below and there select Navigation. Then the toolbar should appear again
user avatar
  • 1,373
5 votes
Accepted

QComboBox nested within a Qmenu?

Your problem is with self.ShapeLayerList = QWidgetAction(self.projCombo) That is creating a QWidgetAction with the combo box as its parent widget, not its child widget. Try: self.ShapeLayerList=...
user avatar
  • 26.2k
5 votes

How do i save my tool arrangement at the top of arcmap when i close it?

This is a quirk of Esri, it used to be the other way around. By default it will save all customization in only the current document, to change this open the menu customize::customize mode.. Turn off ...
user avatar
5 votes

Why are some QGIS tools only available via the Processing Toolbox?

Processing Toolbox menus & buttons are easy to configure in QGIS 3: Settings Options Tab Processing
user avatar
  • 3,511
5 votes
Accepted

Manipulating value with toolbar

I've coded a simple QgsMessageBar which contains a widget with 3 double-spinbox (and their labels), and a QPushButton for load colors. One for each color (Blue, Orange and Red). Each SpinBox have a ...
user avatar
  • 11.7k
5 votes

Hiding icon(s) from QGIS toolbar(s)

You are nearly there with interface customisation - if you hove over the icon you'll get it's name - you can then search in the interface customisation dialogue for the tool, untick it, then when you ...
user avatar
  • 1,472
5 votes
Accepted

How to Enable/Disable Topological Editing Programatically

You can do the following to enable snapping and then topological editing (it happens at QgsProject level): new_conf = QgsSnappingConfig(QgsProject.instance().snappingConfig()) new_conf.setEnabled(True)...
user avatar
  • 28.6k
4 votes

Starting ArcMap editing session without displaying Editor toolbar?

If your code just finds and executes the Start Editing command item then ArcMap will start an edit session and launch the Editor toolbar. There's probably a whole bunch of code behind that control. ...
user avatar
  • 464
4 votes
Accepted

ToolBar icon images missing

Assuming the basic directory structure of the uninstalled plugin is: GraphicGroundwater icon.png icons addBase.png ... resources.qrc ... You will want something like this in ...
user avatar
  • 7,586
4 votes
Accepted

ArcMap add in constructor called not called on start up

In config.esriaddinx, set the tool's onDemand property to false. Similarly, if you have any extensions that need to be initialized at startup, set its autoLoad property to true.
user avatar
  • 35.4k
4 votes
Accepted

Finding name of QGIS toolbar in Python?

Based on the answer and comments on this post: Tool Bar visibility in PyQGIS, we can determine the name of these objects and set their visibility to False. If you go to the menubar and select Settings ...
user avatar
  • 72.2k
4 votes
Accepted

QGIS: add a widget to a toolbar other than the Plugins toolbar

From the QgisInterface class, most toolbars have a addToolBarWidget method which allows you to directly add your widgets to the relevant toolbar. For example, if you want to add your button to the ...
user avatar
  • 72.2k
4 votes

Manipulating value with toolbar

You want to style your layer based on three values and you want a quick way to change those values. One way to get something close would be to create a layer with no geometry and put the three ...
user avatar
  • 1,702
4 votes

Finding "Add Feature" Tab in QGIS 3

The thing that you are looking for is emphasized in blue. P.S. Just check slightly above the highlighted toolbar.
user avatar
  • 23k
4 votes

Snapping window floating in QGIS 3.4.1?

Because you opened it via Project > Snapping options... Close your floating window, right click on some empty toolbar area and under Toolbars activate Snapping Toolbar as shown below: But note that ...
user avatar
4 votes

Snapping window floating in QGIS 3.4.1?

To dock a floating toolbar Click on the end of the toolbar (see the circled area in the image below) and drag it to any side of the QGIS window until it snaps into place. That toolbar will re-appear ...
user avatar
  • 23k
4 votes

Toggling multiple toolbars on/off in QGIS

When toggling on or off a Toolbar from the View --- > Toolbars will automatically close the menu after clicking. A quicker way to add/remove toolbars or panel is to click on the tool bars and a ...
user avatar
  • 1,745
4 votes

Why can't I see the symbol of new polygon object in my custom toolbar

You are not doing anything wrong. In QGIS, only one layer can be active at a time. Some buttons on toolbars are hidden or visible, depending on the geometry type of the active layer. For example, I've ...
user avatar
3 votes
Accepted

Finding the Python script used by a custom toolbar button in ArcMap

In the requester's mxd, if you go to the Customize drop-down and then select Customize Mode (This is in 10.1. I can't remember if 9.3 was exactly the same, but either way look for Customize Mode ...
user avatar
  • 2,358
3 votes

Finding the Python script used by a custom toolbar button in ArcMap

Python add-ins are new to 10.1. So your 9.3 user won't be able to use one. If he decides to migrate to 10.1 or higher (wouldn't be a bad thing after all, 9.3 is not supported for a while): Add-ins ...
user avatar
  • 9,567
3 votes

Getting back to side bar after detaching layer panel in QGIS

Inability to dock floating "Layers" panel is still a bug in QGIS 3.10-5 (LTR) on Windows 10 1909. However, as others have suggested restarting QGIS then immediately double-clicking the "...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible