I wonder where I can find the documentation for QtScript() function?
Also, I can get properties like .visible or .selected but I can't call any functions?
Eg, the StringGadget is internally a QLineEdit gadget (Reference). I can get properties like cursorPosition without any issues. But I can't call any function like setSelection(). Is there a way to call functions, too?
Background: I did a cross platform auto-complete for StringGadget. I made it work on all platforms except Linux with QT because I can't get and set the selection. If I try like this, it returns an error:
Code: Select all
Define gadgID.i = StringGadget(#PB_Any, 10, 10, 380, 26, "Test content")
Debug "Test: " + QtScript(~"gadget("+Str(gadgID.i)+~").setSelection(2,4);")
But setSelection is a public function of QLineEdit (source).
PS. I know the gtk functions gtk_editable_select_region_() for that. But I'm on QT subsystem.