Subgroup: Virtual

Class: QgsVirtualLayerTask

class qgis.core.QgsVirtualLayerTask(definition: QgsVirtualLayerDefinition)

Bases: qgis._core.QgsTask

Constructor.

Parameters:definition – The definition to use for initializing the virtual layer

Initializes a virtual layer with postpone mode activated and reloads the data in a separated thread.

New in version 3.2: Methods

cancel Cancels the pending query and the parent task.
childEvent
connectNotify
customEvent
definition Returns the virtual layer definition.
disconnectNotify
finished
isCanceled
isSignalConnected
layer Returns the underlying virtual layer.
receivers
run Reloads the data.
sender
senderSignalIndex
setProgress
takeLayer Returns the underlying virtual layer and ownership.
timerEvent

Signals

Attributes

cancel(self)

Cancels the pending query and the parent task.

childEvent()
connectNotify()
customEvent()
definition(self) → QgsVirtualLayerDefinition

Returns the virtual layer definition.

disconnectNotify()
finished()
isCanceled()
isSignalConnected()
layer(self) → QgsVectorLayer

Returns the underlying virtual layer.

receivers()
run(self) → bool

Reloads the data.

Returns:True if the virtual layer is valid, false otherwise.
sender()
senderSignalIndex()
setProgress()
takeLayer(self) → QgsVectorLayer

Returns the underlying virtual layer and ownership.

timerEvent()