Linked Questions
17 questions linked to/from Programatically check for mouse click in PyQGIS
3
votes
1
answer
5k
views
Getting row, col on click of a pixel on a QGIS map
I want to get the row, col coordinates of a raster I'm viewing in QGIS by clicking on a pixel. I found Displaying row/column of point in raster using QGIS?, which presumably provides hints about how ...
2
votes
1
answer
4k
views
`NameError: name `qgis` is not defined` in QGIS Plugins
In the QGIS (2.99) Python Console, the name/variable qgis seems to be automatically defined.
However, in writing a plugin, there is an error whenever I refer to qgis. For example, in I have qgis....
0
votes
2
answers
3k
views
Point Click for Coordinates - Stand Alone QGIS in Python [duplicate]
I am implementing a stand alone version of the answer to this question How to programatically check for a mouse click in QGIS
My code is below. The code compiles without error, and the toolbar button ...
2
votes
1
answer
2k
views
Capturing mouse movement on QgsMapCanvas?
I have a python app that uses QgsMapCanvas as map display. I put it inside a QWidget, which is then inside another control. The problem is that there seems to be no way of tracking mouse move event on ...
4
votes
1
answer
2k
views
Programmatically selecting features by polygon
Expanding upon this post how could you use QGIS to programmatically draw a selection polygon and select features within the polygon? I have been using QgsMapToolEmitPoint(self.canvas), to find and ...
3
votes
1
answer
2k
views
Dynamically selecting t layer features implementing canvasMoveEvent of QgsMapToolIdentify class?
In my QGIS plugin I need to dynamically select features of a layer with the mouse move event.
In Programatically check for mouse click in PyQGIS? the canvasMoveEvent of the QgsMapTool class is ...
0
votes
2
answers
2k
views
How to display data from a feature?
I want to display data based on the feature currently selected/clicked on.
I am following a tutorial from http://www.qgisworkshop.org/html/workshop/plugins_tutorial.html.
It initially shows you how ...
3
votes
1
answer
3k
views
Retrieve point coordinates from map canvas using QGIS API [duplicate]
I'm trying to build a plugin that firstly captures the map coordinates.
I have tried to adapt the map tool explained in this post: How to programatically check for a mouse click in QGIS
The code I ...
2
votes
1
answer
903
views
Combining a MapTool and a QGIS plugin toolbar?
This is a follow-up question to my question about how to build a QGIS plugin and link a textbox to the plugin toolbar (Adding textbox to QGIS plugin toolbar?).
In addition to that, I was wondering ...
0
votes
0
answers
2k
views
AttributeError: Myclass instance has no attribute 'x'
I am trying to select a feature from the layer using my plugin. When working with my plugin in main Python function using QGIS, I receive an AttributeError when I call a class method from within the ...
1
vote
1
answer
1k
views
Event programming in QGIS
I have identified a need to change VRTs raster order through its order of appearance in it's respective XML file. Unfortunately this seems to not be possible to do dynamically using QGIS commands or ...
2
votes
1
answer
2k
views
Using custom behaviour on right click and actionPan on left click in QGIS plugins?
I implemented a maptool that draws a red cross on the point that is being right-clicked on. There are good how-tos, such as this topic : Programatically check for mouse click in PyQGIS?
But I happen ...
2
votes
1
answer
697
views
Getting coordinates on click and pass it to dialog using PyQGIS?
I am creating a plugin in which i need to get coordinates by clicking on QGIS canvas so i tried the solution mentionned at Getting coordinates by clicking on QGIS Canvas with PyQGIS? but it didn't ...
1
vote
0
answers
748
views
Editing QGIS point layer to retrieve attributes of intersecting line layer? [closed]
I'm creating a custom editing form using QGIS 2.0 and would like to modify the mouse event when creating a point. I've gotten a start by reading Programatically check for mouse click in PyQGIS?
In ...
1
vote
1
answer
464
views
QgsMapCanvas object is not callable (Ubuntu with, Eclipse, Python & QGIS 2.0)
I'm basically borrowing the code for picking up a coordinate from a mouse click from this answer :
How to programatically check for a mouse click in QGIS
However in a stand alone application I do ...