[Qt-interest] Using Qt Enums in QtScripts
Girish Ramakrishnan
girish at forwardbias.in
Fri Jul 22 08:55:40 CEST 2011
Hi Jordan,
I think you are looking for staticQtMetaObject (it's the meta object
for the Qt namespace). This variable is available in any QObject
derived class; you can do something like
staticQtMetaObject.indexOfEnumerator("Key").
Girish
On Thu, Jul 21, 2011 at 12:56 AM, Jordan Upham <jupham at zipitwireless.com> wrote:
> I'm looking to script an embedded application and I want to generate key
> events. I was wondering if it is possible to get at Qt's Key enum so that I
> do not have to make some mapping for each key. From the documentation I can
> find that it looks like this is possible by using a some meta object. What
> I'm not sure of is the code to do this in c++ and how to access it in the qt
> script. Any help would be appreciated.
> Thanks
> Jordan Upham
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
>
More information about the Qt-interest-old
mailing list