Results 1 to 2 of 2

Thread: Using Qt.binding() when the function has parameters

  1. #1
    Join Date
    Apr 2014
    Posts
    125
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Android Maemo/MeeGo

    Question Using Qt.binding() when the function has parameters

    Hello

    How to use Qt.binding() when the function to wrap has parameters.

    In both QML and JS files:

    Component.onCompleted: {
    color = Qt.binding(function(myValue) {
    return my_exposed_cpp_object.my_function((myValue);
    });
    }

    Will this force the reevalution each time myValue changes.

    Thanks;

    Mut.

  2. #2
    Join Date
    Apr 2014
    Posts
    125
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Android Maemo/MeeGo

    Default Re: Using Qt.binding() when the function has parameters

    Can I use Qt.binding() in a IF staetment. Example:

    if (Qt.binding(function(myValue) {
    return my_exposed_cpp_object.my_function((myValue);
    ) {
    }

Similar Threads

  1. Call JavaScript function with parameters from Qt C++
    By qt_developer in forum Qt Programming
    Replies: 5
    Last Post: 13th January 2015, 01:31
  2. QML function with optional parameters?
    By ricardodovalle in forum Qt Quick
    Replies: 2
    Last Post: 14th August 2014, 23:34
  3. Replies: 4
    Last Post: 22nd January 2014, 02:25
  4. QScript + get function call parameters
    By Fastman in forum Qt Programming
    Replies: 3
    Last Post: 1st August 2009, 16:30
  5. Wrong function according to parameters is taken
    By Lykurg in forum General Programming
    Replies: 5
    Last Post: 20th March 2009, 20:55

Tags for this Thread

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.