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
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
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.