Results 1 to 2 of 2

Thread: How to call the C++ member function from the JScript

  1. #1
    Join Date
    Oct 2008
    Posts
    5
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default How to call the C++ member function from the JScript

    Hi,

    We have a requirement in QT that i have C++ class contains data and member functions.
    I will pass an object to Javascript function, i should be able to call any of the member functions from Javascript.

    Please help me, i will really appreciate you.

    Ex:
    Qt Code:
    1. function Add(myObj) //myObj C++ object
    2. {
    3. this.myObj = myObj;
    4. var a = display();
    5. return a;
    6. }
    To copy to clipboard, switch view to plain text mode 

    Regards
    Srinivas
    Last edited by jpn; 18th October 2008 at 10:57. Reason: missing [code] tags

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: How to call the C++ member function from the JScript

    See QScriptable class and the Qt Script presentation from DevDays2007 (search for "Qt Script Prototype Objects").
    J-P Nurmi

Similar Threads

  1. QPSQL problem
    By LoneWolf in forum Installation and Deployment
    Replies: 60
    Last Post: 4th November 2009, 15:22
  2. QPSQL driver in windows
    By brevleq in forum Installation and Deployment
    Replies: 31
    Last Post: 14th December 2007, 13:57
  3. how to add static library into qmake
    By Namrata in forum Qt Tools
    Replies: 1
    Last Post: 20th November 2007, 18:33
  4. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 07:13
  5. use qpsql
    By raphaelf in forum Installation and Deployment
    Replies: 34
    Last Post: 22nd August 2006, 13:52

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.