Results 1 to 3 of 3

Thread: howto send a reply using QDBusMessage

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2010
    Posts
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: howto send a reply using QDBusMessage

    it seems that I have to implement the follow slot

    Qt Code:
    1. int getValue(QString key,const QDBusMessage&);
    To copy to clipboard, switch view to plain text mode 

    and the slot implemantation is

    Qt Code:
    1. int getValue(QString key,const QDBusMessage& msg) {
    2.  
    3. QVariant v(2);
    4. QDBusMessage reply= msg.createReply(v)
    5. QDBusConnection::sessionBus().send(reply);
    6.  
    7. Return 0;
    8. }
    To copy to clipboard, switch view to plain text mode 

    However I recevied 2 replys in that case .
    According to the QT document no reply should be send on return.

  2. #2
    Join Date
    Jan 2010
    Posts
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: howto send a reply using QDBusMessage

    I have to set


    Qt Code:
    1. msg.setDelayedReply(true);
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. QDBusMessage problem
    By nrabara in forum Newbie
    Replies: 1
    Last Post: 10th November 2012, 09:17
  2. QDBusMessage returns NULL string
    By nrabara in forum Qt Programming
    Replies: 0
    Last Post: 27th November 2009, 06:09
  3. Qt widget causing "unexpected async reply"
    By gct in forum Qt Programming
    Replies: 3
    Last Post: 11th March 2008, 15: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.