Pop quiz
Q1. Which class can you use to read the data received over the network?
QNetworkReply
QNetworkRequest
QNetworkAccessManager
Q2. What should you usually do with the QNetworkReply *reply
object in the finished()
signal handler?
- Delete it using
delete reply
- Delete it using
reply->deleteLater()
- Don't delete it
Q3. How to ensure that your application won't freeze because of processing an HTTP request?
- Use
waitForConnected()
orwaitForReadyRead()
functions - Use
readyRead()
orfinished()
signals - Move
QNetworkAccessManager
to a separate thread
Q4. Which class can you use to create a UDP server?
QTcpServer
QUdpServer
QUdpSocket