is it possible to have multiple task dialogs active simultaneously? I have multiple FeaturePythons and I'd like to open task dialogs for some of them, tinker with some parameters and save them. Nevertheless, when I do
You can have only one TaskDialog at a time but a task dialog can have multiple task boxes. As an example to see how this looks create a sketch in PartDesign and edit it. On the left side you will see several boxes.
wandererfan wrote: ↑Sat Jun 22, 2019 1:09 am
You can't have multiple task dialogs, but you can show a QDialog from within a task dialog.
Yes, that's what I need. I wrongly assumed that what I see during sketching (img below) is multiple task dialogs. I haven't noticed there's only one StandartButton.
QDialogs.png (19 KiB) Viewed 1683 times
Could you nudge me in a direction how to do that?
Is there a way how to access currently opened task dialog (I can't find anything useful to do so in FreeCAD/src/Gui/Control.h)?
from PySide2 import QtWidgets
class TaskDialog():
def __init__(self):
self.form=[QtWidgets.QCalendarWidget(),QtWidgets.QCalendarWidget(),QtWidgets.QCalendarWidget()]
FreeCADGui.Control.showDialog(TaskDialog())
So, the whole magic is that you define an attribute "form" that is a list of widgets.
from PySide2 import QtWidgets
class TaskDialog():
def __init__(self):
self.form=[QtWidgets.QCalendarWidget(),QtWidgets.QCalendarWidget(),QtWidgets.QCalendarWidget()]
FreeCADGui.Control.showDialog(TaskDialog())
So, the whole magic is that you define an attribute "form" that is a list of widgets.
I see. Thanks!
Btw. Is there a way to retrieve currently open TaskDialog (through Gui.Control or using another way)?
is it possible to have multiple task dialogs active simultaneously? I have multiple FeaturePythons and I'd like to open task dialogs for some of them, tinker with some parameters and save them. Nevertheless, when I do