Results 1 to 2 of 2

Thread: Binding a class into Qt script engine

  1. #1
    Join Date
    Dec 2010
    Posts
    1

    Default Binding a class into Qt script engine

    Hello,

    I'd like to bind a class from C++, say MyClass, to my QtScript engine. So a user could then create an object of it, e. g.:

    Qt Code:
    1. var usersObjectOfMyClass = new MyClass("someArg");
    2. usersObjectOfMyClass.doSomething();
    To copy to clipboard, switch view to plain text mode 

    Is it possible to predefine such classes in C++ that could be exposed and instantiated using the "new" word inside the ECMAScript?

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Binding a class into Qt script engine


Similar Threads

  1. Replies: 3
    Last Post: 16th June 2010, 10:32
  2. Binding data to a a QGraphicsItem (or something like that)
    By been_1990 in forum Qt Programming
    Replies: 18
    Last Post: 13th August 2009, 08:33
  3. Can I include a script from script?
    By yycking in forum Qt Programming
    Replies: 1
    Last Post: 24th April 2009, 03:01
  4. QUdpSocket binding
    By db in forum Qt Programming
    Replies: 0
    Last Post: 13th March 2008, 11:24
  5. binding
    By mickey in forum General Discussion
    Replies: 9
    Last Post: 26th September 2006, 21:54

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.