Re: [QGIS-Developer] Any gotchas related to working with QgsVectorLayer inside a QgsTask?

2019-03-11 Thread Tejas L
Nyall, thanks for the tip. Doing a self.layer.moveToThread(QCoreApplication.instance().thread()) as the last step in QgsTask.run() worked for me. Regards, Tej From: Nyall Dawson Sent: Friday, March 8, 2019 7:10 AM To: Tejas L Cc: qgis-developer@lists.osgeo.org

Re: [QGIS-Developer] Any gotchas related to working with QgsVectorLayer inside a QgsTask?

2019-03-07 Thread Nyall Dawson
On Wed, 6 Mar 2019 at 02:56, Tejas L wrote: > > Hello Team, > > I know that the UI must not be updated from the QgsTask.run() method. Are > there any similar restrictions on loading QgsVectorLayer from a file or > creating new layers from QgsTask.run() ? Some. For a start, you CAN'T utilise a

[QGIS-Developer] Any gotchas related to working with QgsVectorLayer inside a QgsTask?

2019-03-05 Thread Tejas L
Hello Team, I know that the UI must not be updated from the QgsTask.run() method. Are there any similar restrictions on loading QgsVectorLayer from a file or creating new layers from QgsTask.run() ? I find that some operations on a GPKG layer do not work as expected when run from a QgsTask.