You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nowadays, we can run or test a script from the command line using –run or –test.
The one missing piece would be to be able to initialize the dialog from the command line, particularly useful for testing.
Script Dialog use widget name to access data from QML, for example a QLineEdit named fileName will be accessed using data.fileName from QML. We could use a similar mechanism to initialize data. I'm thinking of something like that:
Nowadays, we can run or test a script from the command line using
–runor–test.The one missing piece would be to be able to initialize the dialog from the command line, particularly useful for testing.
Script Dialog use widget name to access data from QML, for example a
QLineEditnamedfileNamewill be accessed usingdata.fileNamefrom QML. We could use a similar mechanism to initialize data. I'm thinking of something like that:ie passing either a json fileName or a string that can be interpreted as a json file.
That would mean:
ScriptDialogItem::initialize(json)to initialize the dialog from a jsonScriptRunner::runQmlif it's a ScriptDialog, pass the json to itFinally, once everything is done, add a test:
ScriptDialog#28