Results 1 to 2 of 2

Thread: Displaying the return value of CPP functions in QML

  1. #1
    Join Date
    May 2011
    Posts
    22
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Default Displaying the return value of CPP functions in QML

    I am creating a RADIO gui in QML. I have defined functions in the CPP file for NEXT and PREV buttons. Could you please tell me how the return value of these functionscould be printed in the Text part of the Display item. As in how how do I not only call the return value but print it in another ITEM.


    Please help.

  2. #2
    Join Date
    Nov 2010
    Posts
    82
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Displaying the return value of CPP functions in QML

    your function must Q_INVOKABLE and just put text:CObject.function() in your object
    the return value must be of type QString

Similar Threads

  1. C++ virtual functions
    By sonulohani in forum Newbie
    Replies: 3
    Last Post: 23rd May 2012, 09:17
  2. QWidget with a return value
    By klenze in forum Newbie
    Replies: 6
    Last Post: 23rd November 2011, 15:04
  3. QSqlQuery don't return
    By ShadowBelmolve in forum Newbie
    Replies: 2
    Last Post: 9th September 2010, 20:28
  4. constructors, new, return
    By TheKedge in forum General Programming
    Replies: 1
    Last Post: 29th September 2006, 14:43
  5. name of exported dll functions
    By vrudolf in forum General Programming
    Replies: 2
    Last Post: 30th July 2006, 20:18

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