Skip to content
Advertisement

QtConcurrent in PySide/PyQt

I’m trying to figure out if subclassing QtConcurrent and writing a run method inside it will work:

class Task(QtCore.QtConcurrent):

     def run(self, function):
           function()

Or is it completely useless?

Advertisement

Answer

It’s completely useless, because QtConcurrent is a namespace, not a class.

Also, neither PyQt nor PySide provide any of the functionality provided by QtConcurrent, because it’s all template-based and therefore impossible to wrap.

PS: the PySide documentation you linked to is for the ReduceOption enum. Since it’s doubtful whether that enum has any use outside the QtConcurrent namespace, it’s probably a bug that PySide includes it.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement