qtcpsocket Questions

10

How do I know which version of Qt I am using? When I open Qt Creator it shows "Welcome to Qt Creator 2.3". In the build setting, however, it shows Qt Version 4.7.1.
Titania asked 14/4, 2014 at 11:18

3

Solved

I am using Qt and QTcpSocket to create a small chat client/server application. When I compile my code, the compiler returns the following error: main.cpp:3:22: fatal error: QTcpSocket: No such fi...
Taskwork asked 5/11, 2012 at 4:3

7

Solved

When using QTcpSocket to receive data, the signal to use is readyRead(), which signals that new data is available. However, when you are in the corresponding slot implementation to read the data, ...
Zwieback asked 15/4, 2013 at 19:43

5

Solved

I'm trying to write a piece of code that periodically tries to connect to the server using QTcpSocket until the server is up and ready. The client should also automatically and periodically try rec...
Thermionic asked 22/7, 2012 at 12:25

4

Solved

I need to send binary data through a QTcpSocket. I was thinking about using QDataStream, but I've encountered a problem - it silently fails if no data has arrived at the time I try to read. For ex...
Hickie asked 30/10, 2013 at 11:55

2

Solved

I am looking to create a QTcpServer using PyQt that can simultaneously return data to 2 or more clients. I assume that this will require threading. Using the threadedfortuneserver.py example as a ...
Untidy asked 20/2, 2012 at 2:32

1

I've got a threaded server. QTcpSocket needs to be created on the thread it needs to be ran on, FI: Qt - Handle QTcpSocket in a new thread by passing the socket descriptor. My problem is that, I ...
Cullie asked 6/7, 2016 at 6:43

1

Solved

I have created a sslclient and sslserver using QSslSocket in Qt 5.4.1 in debian wheezy. When I run the program they dont work at all. After debuging my code I saw when it try to create a new object...
Rabies asked 27/5, 2015 at 5:14

1

Solved

Please advise how can I setup default connection timeout without using blocking waitForConnected() method? I noticed that socket emit error signal (QAbstractSocket::SocketTimeoutError) after about ...
Gluttony asked 16/8, 2014 at 21:8

1

I'm attempting to multi-thread server in QT. However, I keep getting this annoying error: error: Not a signal or slot declaration (Line 21) Here is my code: mythread.h #ifndef MYTHREAD_H #de...
Polygenesis asked 15/3, 2014 at 21:1

2

Solved

I'm writing a program that will do 1 GET request a second to a server. I am using a socket (QTcpSocket), and I want to know if I should include "Connection: Close" within my request and then recrea...
Cavanagh asked 15/12, 2013 at 20:45

4

Solved

Now the server (implemented with java) will send some stream data to me, my code is like below: connect(socket, SIGNAL(readyRead()), this, SLOT(read_from_server())); in the read_from_server(): ...
Halt asked 29/11, 2013 at 14:47

1

Solved

I create simple multi threading server: Create server If new connection create new QThreadpool - QRunnable In runnable send message to client and wait request If client was been disconnected runn...
Calmative asked 18/11, 2013 at 11:47

4

Solved

I have a QTcpSocket and I am reading into a loop. Each time a full packet has been read, or there has been an error, I manually check the status of the socket inside the loop, with: while(true){ ...
Revulsive asked 4/5, 2012 at 8:14

3

Solved

I have the following snippet of code in the body of a loop responsible for reading data from a QTcpSocket (nntp is a pointer to a QTcpSocket). std::vector<char> buffer; int bytesAvailable = ...
Diamonddiamondback asked 20/5, 2013 at 15:40

1

I want to know about Qt's implementation of QTcpSocket's ReadyRead signal. How is it implemented on Windows and on Linux? Using select(), poll(), epoll(), SIGIO or any other way? How does QTcpSocke...
Newsstand asked 13/5, 2013 at 14:47

1

Solved

Is it possible to create a new QSslSocket and for it to take ownership over the existing TCP connection, and the old QTcpSocket to be discarded, without interrupting or closing the TCP connection? ...
Nora asked 10/1, 2013 at 12:31

2

Is there any simple way to send a file to server with the filename included so that the filename in server and client are exactly the same? Here is my code Sender QString path = QApplication::ap...
Tipcat asked 10/12, 2012 at 12:9

1

Solved

I'm using Qt to create TCP server using QTcpServer. Every time a client connects to server, I would like to know the remote host's IP address and port number. I tried searching documentation but co...
Pewter asked 9/2, 2012 at 0:58

1

Solved

I've been struggling for a couple of days now with this problem on QTcpSockets and QThreads. I have a QTcpServer that listens on a port and creates a new Client using the nextPendingConnection(). ...
Dowdy asked 5/11, 2011 at 5:6

1

Solved

I'm a little confused on the behavior of QTcpSocket::waitForBytesWritten()... Until when does this function block? Until the data is written to the OS's internal buffer for transmission over TCP...
Fante asked 11/1, 2011 at 3:43
1

© 2022 - 2025 — McMap. All rights reserved.