Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QRemoteObjectPendingReply ?
Forum Update on Monday, May 27th 2025

QRemoteObjectPendingReply ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
qtroqtremoteobject
3 Posts 3 Posters 1.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    batcher
    wrote on last edited by
    #1

    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 ?.
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

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

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • U Offline
        U Offline
        Ulle84
        wrote on last edited by
        #3

        Just had the same problem, here are my findings:

        QRemoteObjectPendingReply inherits from QRemoteObjectPendingCall.

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

        Example:

        // DeviceManagerReplica* m_deviceManager
        // class DeviceManagerReplica created via rep-compiler
        QRemoteObjectPendingReply<QStringList> result = m_deviceManager->availableDevices();
        result.waitForFinished();
        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.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved