Results 1 to 6 of 6

Thread: How to send objectpath as an argument in dbus method?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2009
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanked 1 Time in 1 Post

    Default Re: How to send objectpath as an argument in dbus method?

    I had the same problem and solved it with QVariant::fromValue()

    Qt Code:
    1. QDBusObjectPath objectpath("/mypath");
    2. ((QDBusInterface*)iface)->call("Path", QVariant::fromValue(objectpath));
    To copy to clipboard, switch view to plain text mode 

  2. The following user says thank you to anders for this useful post:

    Sage (7th January 2010)

  3. #2
    Join Date
    Aug 2009
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    1

    Default Re: How to send objectpath as an argument in dbus method?

    Quote Originally Posted by anders View Post
    I had the same problem and solved it with QVariant::fromValue()

    Qt Code:
    1. QDBusObjectPath objectpath("/mypath");
    2. ((QDBusInterface*)iface)->call("Path", QVariant::fromValue(objectpath));
    To copy to clipboard, switch view to plain text mode 
    Works like a charm, thanks.

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.