Results 1 to 2 of 2

Thread: Qdbus remote method calling issue

  1. #1

    Default Qdbus remote method calling issue

    Hi ,

    My remote method signature is

    void SetProperty(string property, variant value)

    Here i am calling my method with
    Qt Code:
    1. QVariant v(1);
    2.  
    3. enable.enable(QString("Powered"),v); // calling
    4.  
    5.  
    6. inline QDBusPendingReply<> enable(const QString &value,const QVariant &var)
    7. {
    8. QList<QVariant> argumentList;
    9. argumentList << qVariantFromValue(value) << qVariantFromValue(var);
    10. return asyncCallWithArgumentList("SetProperty", argumentList);
    11. }
    To copy to clipboard, switch view to plain text mode 
    It giving error like

    "Method "SetProperty" with signature "ss" on interface "xxx" doesn't exist


    How do i send my second argument as variant
    Last edited by high_flyer; 19th May 2011 at 08:56. Reason: code tags

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qdbus remote method calling issue

    Are you sure you are calling the method on a proper object/interface? Can you call other methods successfully? Also, what does "var" contain? What if you change line #9 to:
    Qt Code:
    1. argumentList << value << var;
    To copy to clipboard, switch view to plain text mode 
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Calling a method from a non-member method
    By AndresBarbaRoja in forum Newbie
    Replies: 5
    Last Post: 19th March 2011, 10:38
  2. Calling a method to a parent window/widget
    By johnnyturbo3 in forum Newbie
    Replies: 4
    Last Post: 6th November 2010, 15:52
  3. error calling method using connect
    By jeffmetal in forum Newbie
    Replies: 4
    Last Post: 22nd April 2010, 18:09
  4. Replies: 1
    Last Post: 30th March 2009, 16:07
  5. Calling same method from separate threads
    By steg90 in forum Qt Programming
    Replies: 2
    Last Post: 19th July 2007, 08:55

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.