Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- QRemoteObjectNode repNode;
- QTcpSocket *socket = new QTcpSocket(&repNode);
- QObject::connect(_socket, &QTcpSocket::connected, &repNode,[&]()
- {
- qDebug() << "connected...";
- repNode.addClientSideConnection(socket);
- QSharedPointer<RemoteObjectReplica> ptr;
- ptr.reset(repNode.acquire<RemoteObjectReplica>("remoteObject"));
- ptr.data()->test("hello world");
- QObject::connect(ptr.data(), &RemoteObjectReplica::signalTest, &a, [](int x) {
- qDebug() << "x:" << x;
- });
- });
- socket->connectToHost(QHostAddress(QStringLiteral("127.0.0.1")), 65213);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement