#!/usr/bin/env qross import Qross, os # window = Qross.activeWindow() # if window == None: # print "Creating new dialog" # window = Qross.createDialog("TestGuiFormDialog") # else: # print "Using active window" print "1................" forms = Qross.module("forms") print "2................" print "===================================> %s" % forms print dir(forms) dialog = forms.createDialog("TestGuiFormDialog") dialog.setButtons("Ok|Cancel") dialog.setFaceType("List") # Auto Plain List Tree Tabbed # print "===> dialog %s %s" % (dialog,dir(dialog)) # page0 = dialog.addPage("Welcome","Welcome","about_kde") ##widget0 = Qross.forms().createWidget(page0, 'QWidget', 'MyForm1', {}) ##widget0label = Qross.forms().createWidget(page0, 'QLabel', 'label', {'text':'Testlabel'}) # widget0 = Qross.forms().createWidgetFromUI(page0, #'<ui version="4.0" >' #' <class>Form</class>' #' <widget class="QWidget" name="Form" >' #' <layout class="QHBoxLayout" >'
#!/usr/bin/env qross """ This Python script demonstrates how Qross could be used from within python scripts. """ print "__name__ = %s" % __name__ #print "__main__ = %s %s" % (__main__,dir(__main__)) #import TestObject1, TestObject2 #self.object1 = TestObject1 #self.object2 = TestObject2 import Qross #print dir(Qross) kjsaction = Qross.action("MyKjsScript") #print dir(kjsaction) kjsaction.setInterpreter("javascript") kjsaction.setCode( "println(\"Hello world from Kjs\");" ) print "-----------------------> trigger" kjsaction.trigger()