I have an algorithm that during execution gathers information from the data
and then pops up a window for the user to select what the user would like
to do.
Is this possible in the Processing framework? I have tried doing this in
processAlgorithm and it crashes QGIS. Here is how I call the popup window.
fieldsDialog = SelectionDialog(self.tableFeatures)
fieldsDialog.exec_()
items = fieldsDialog.selected
Here is the beginning of the SelectionDialong class.
class SelectionDialog(QDialog, FIELDS_CLASS):
def __init__(self, feat, parent=None):
super(SelectionDialog, self).__init__(parent)
self.setupUi(self)
Prior to Processing I passed in iface.mainWindow() as the parent. Is there
a proper parent in Processing to pass? Perhaps this is the reason it is
crashing.
class SelectionDialog(QDialog, FIELDS_CLASS):
def __init__(self, iface, feat):
super(SelectionDialog, self).__init__(iface.mainWindow())
self.setupUi(self)
Thanks,
Calvin
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer