Rasto,
I found myself in the same situation as you when trying to run Python commands, functions or methods through dynamic properties in QT designer.
I have discovered a workaround, however I'm by no means an expert with Python or QT so there are probably better ways to get this to work. At least for now you can do this by passing your command from MEL to Python with the help of the
python command.
From what I read in the help docs, the
python command allows users to execute Python commands from the MEL side.
-QT Designer-
1. Add a dynamic property
String... to whatever widget you want.
2. For the property name use a MEL flag equivalent such as
-command.
3. For the string add the
python command in front of the command/function/method.
For example to create a polySphere I would write my string like so:
"python \"polySphere()\""
Add
cmds. or
pm. to the front of your commands if necessary:
"python \"pm.polySphere()\""
Or if I had already defined a function identified as
go() I would use this as my string:
"python \"go()\""
Hope this helps :)