Questions tagged [qthread]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
139 views

QThread crashes QGIS

I'm trying to use a QThread for CSV export that can freeze my UI. Therefore I have a polyvalent Thread class below : class Thread(QThread): finished = pyqtSignal() def __init__(self, fn, *...
  • 1,023
0 votes
0 answers
239 views

How to run multiple threads from a background worker QThread inside a QGIS plugin?

I am trying to run several threads simultaneously from a single worker thread inside a QGIS plugin. The objective is to be able to click a button on the GUI and have this launch a "background ...
  • 113
0 votes
1 answer
175 views

PyQGIS QgsMessageLog "NameError: name 'Qgis' is not defined"

I'm trying to debug a pyQGIS plugin, but can't get one of the Qthread working. I was told QgsMessageLog was the best way; QgsMessageLog.logMessage("before simplify", "plugin", ...
  • 336
7 votes
2 answers
537 views

QThread - map not loading after the thread is done

I'm using QThread to run processingBar and heavy job so the user will know it's loading. Everything works fine until the job is done then the map is stuck and not reloading. It looks like I need to ...
  • 153
3 votes
1 answer
184 views

QgsVectorLayer creation in Qthread (PyQt)

Our QGIS project is dynamically generated on startup based on user roles. There are nearly 120 QgsVectorLayers that need to be generated. If created sequentially, the login process takes up to 2 ...
  • 383
4 votes
1 answer
627 views

Implementing Tasks in a QGIS-Plugin to keep GUI responsive

I am trying to implement QgsTasks into a PlugIn to keep its GUI responsive while running. I have studied the docs at https://docs.qgis.org/3.16/en/docs/pyqgis_developer_cookbook/tasks.html, which ...
  • 30.3k
2 votes
0 answers
325 views

Custom QGIS maptool to return current event

This is what I am trying to do. I designed an interface which can switch between selection mode and placement mode. Selection mode activates the selection tool. Placement mode is what I am ...
11 votes
0 answers
424 views

Multithreaded DB connection for QGIS plugin

I am using QGIS 2.18.21 and PostgreSQL 9.6. on a Windows 8 machine. I am trying to do processing of a certain database task in the background, and I want the user to be able to continue to work in ...