Results 1 to 3 of 3

Thread: passing var object javascript to c++ in function Q_INVOKABLE

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: passing var object javascript to c++ in function Q_INVOKABLE

    Try QVariant as the function argument and then check in the C++ code what the variant contains.

    Cheers,
    _

  2. #2
    Join Date
    Mar 2016
    Posts
    9
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: passing var object javascript to c++ in function Q_INVOKABLE

    it's work with QVariant or QVariantMap,
    my problem is when i read var , i used "parent." and select the property with the editor.

    but value = undefined with qDebug, but if i used the "id", it's work's... arf...

    in Action{ } be careful

    thank's

Similar Threads

  1. Replies: 4
    Last Post: 2nd August 2012, 07:42
  2. Access Object Created by javascript in qml
    By alizadeh91 in forum Qt Quick
    Replies: 6
    Last Post: 23rd February 2012, 15:06
  3. How to call a function in the mother object from a child object?
    By Momergil in forum General Programming
    Replies: 4
    Last Post: 18th December 2011, 15:49
  4. Replies: 9
    Last Post: 29th November 2010, 12:12
  5. Replies: 3
    Last Post: 14th October 2008, 21:04

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
  •  
Qt is a trademark of The Qt Company.