TYPE MyClass EXTENDS QObject Variable AS INTEGER CONSTRUCTOR Variable = 0 END CONSTRUCTOR SUB someMethod MyClass.Variable = 1 END SUB END TYPE ' create an instance DIM instance AS MyClass ' invoke the method instance.someMethod