Couple of queries re QtScript



  • I'm using QtScript to provide a scripting framework for a commercial app.
    It's bewildering stuff, perhaps another reason why it looks like there are big changes in Qt 5.0

    Firstly, whats the recommended way of exposing enums? :) (this seems to be a common query with no published solutions - anywhere)
    I have a class functions that return a global defined enum, and I have corresponding Q_ENUMS, Q_DECLARE_METATYPE etc, and trying to figure out what's next without implementing an uncessarily complicated solution.

    I've googled all combinations of phrases and founding nothing.
    Is it possible to programmatically create the equiv of JS 'enum xxx { y,z }' ?

    UPDATE: Wow, I'm a massive muppet - there is no enum in Javascript yet, holy smoke how did I not know that!

    Secondly, So what is going to break in 5.0 from a 4.8.2 if I'm using a broad swath of QtScript functionality?
    Am I starting to use a framework that is already going to be phased out?

    Cheers



  • Why do you don't like Qt Script's current state? I know, it could be better.

    Yep. In Qt 5 QtScript has massive changes in core and it will have external functionality.

    P.S. It should be moved to The Lounge forum. It does not have correct question or something nearly connected with code or General & Desktop



  • Well I'm an idiot anyway because I just figured out javascript doesn't support native enum yet. Boy that is embarrassing.

    QtScript is great, just a steep learning curve as I'm looking to do complex stuff for my first project.
    Doesn't matter to me if it is just in maintenance mode.



  • [quote author="TimS" date="1340692510"]Well I'm an idiot anyway because I just figured out javascript doesn't support native enum yet. Boy that is embarrassing.

    QtScript is great, just a steep learning curve as I'm looking to do complex stuff for my first project.
    Doesn't matter to me if it is just in maintenance mode.
    [/quote]

    There are no enums in js, because we don't need it there).


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.