Important: Please read the Qt Code of Conduct -

QRemoteObjectPendingReply ?

  • Hello guys,

    While I was working on an application where I use QtRO Module, I set up a QtRO server which have a slot returning A QList<SomeType>, When I call the slot from the client I get a QRemoteObjectPendingReply. I tried to google it but I didn't find any documentation on this type. I managed to get the QList from QRemoteObjectPendingReply by calling returnValue().

    I have some question about this class :

    • is there any doc I can look into for this class.
    • does this Class get the data from the source in sync or async manner ?, if it's async how can I know when it's done fetching ?
    • if it fetch in sync manner, can I just put in another thread so I don't freeze the UI while getting data ?.

  • Lifetime Qt Champion


    Looks like this class has no documentation but it's not a very big one, you should take a look at the sources.

  • Just had the same problem, here are my findings:

    QRemoteObjectPendingReply inherits from QRemoteObjectPendingCall.

    Therefore it inherits the bool waitForFinished(int timeout = 30000) method.


    // DeviceManagerReplica* m_deviceManager
    // class DeviceManagerReplica created via rep-compiler
    QRemoteObjectPendingReply<QStringList> result = m_deviceManager->availableDevices();
    qCDebug(lc) << result.returnValue();

    waitForFinished() seems to be a sync call, thus the m_deviceManager instance should not live in the main GUI-thread.

    Hope this helps.

Log in to reply