14
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:
...
11
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, ...
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 ...
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 ...
8
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)
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.
...
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 ...
7
votes
Using "Toggle Editing" button from PyQGIS
The first option is simply by using the startEditing() method of the QgsVectorLayer class.
layer = iface.activeLayer()
layer.startEditing()
The second option, as was suggested by @J.Monticolo, is to ...
6
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 ...
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
5
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 ...
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
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 ...
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)...
5
votes
Accepted
Accessing custom Toolbar using PyQGIS
You have to use the PyQt method :
toolbar.setObjectName("new Toolbar")
now, the following :
iface.mainWindow().findChild(QToolBar,'new Toolbar')
will return an object, your toolbar.
Or, if ...
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 ...
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 ...
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.
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 ...
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 ...
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 ...
4
votes
Digitizing toolbar is gone in QGIS
I have had issues with disappearing panels (dataPlotly specifically). When that happens I have to go into the Interface Customization settings and reset it. Try playing around in there to see if it ...
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 ...
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 "...
3
votes
Accepted
Unloading plugin fails after changing toolbar location
You could use the following to remove the toolbar before deleting it:
def unload(self):
self.iface.mainWindow().removeToolBar( self.toolbar )
del self.toolbar
3
votes
Accepted
Creating ArcMap toolbar button from model tool?
You need to go to Customize> Customize Mode on the Menu bar, in ArcMap. From there, click the commands tab, and select "Geoprocessing Tools" in the category list. Then browse to your toolbox ...
3
votes
Pan and Zoom toolbar greyed out on ArcGIS Desktop
If you go to the data frame in your table of contents, right click and select properties, Go to Data Frame tab and look at Extent. I am assuming that this map is set up as a 'Fixed Extent' which will ...
3
votes
Accepted
Pan and Zoom toolbar greyed out on ArcGIS Desktop
This is the layout toolbar it will be disabled while in Data View. To enable it go into Layout View (View (menu)>Layout View).
3
votes
Accepted
Name of children of toolbar in QGIS python and how to disable?
First, we can find all object names of the icons in the mapNavToolBar using:
for icon in iface.mapNavToolToolBar().actions():
print icon.objectName()
Decide which ones you want to modify then ...
3
votes
Edit Toolbar Became Disabled While Editing in QGIS
Had the same problem. In my case I had a Shapefile imported as Layer and defined a "Filter" on this Layer. Clearing the filter rule enabled the "Edit Button" again!
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
toolbar × 145qgis × 54
arcgis-desktop × 24
pyqgis × 20
qgis-plugins × 20
arcmap × 16
python × 13
qgis-3 × 13
arcobjects × 12
arcgis-10.0 × 10
icon × 7
arcpy × 6
arcgis-10.3 × 6
editing × 6
add-in × 6
python-add-in × 6
leaflet × 5
tools × 5
gui × 5
leaflet-draw × 5
arcgis-10.2 × 4
arcgis-9.3 × 4
digitizing × 4
vb.net × 4
visual-studio × 4