I have QtDesigner installed , and designed my UI done .
Refering to "userprefs-base.ui" of Draft , I add properties : "prefPath" and "prefEntry" to QSpinBox to get value, and add "color" , "prefPath" and "prefEntry" to QPushbutton to select color .
The question comes , in Draft workbench , the following code is used :
Code: Select all
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft")
if t == "int": return p.GetInt(param)
elif t == "string": return p.GetString(param)
...
for QSpinBox , I could understand , use obj.getValue() to get value , but for QPushbutton , how does the FreeCAD know to get the property "color" newly added ?