in a QT Lib project, create a Qthread which using QUdpSocket to receive data.
Create a win32 console project to use this Qt Lib, but QUdpSocket can't receive any data.
I guess this is due to qapplication don't create, but when i create qapplication and exec it, the console will run in the exec function.
anyone can give some messages.
Welcome to the forum.
As I understand you do not want to use QApplication or QCoreApplication. You need either one for having an event loop. The event loop you need for the sockets.
Probably it would be best to read some of the "tutorials":http://qt.nokia.com/learning/ on Qt for getting familiar with the concepts.
BTW it is Qt. QT is QuickTime.
but when i create QApplication in Qt Lib project, the win32 console application which loads the dll will run in the exec function of QApplication and can't do anything like receive input.
Did you have a look to some of the examples already? Those might give you an idea how handle this.
In your case I would suggest to have a look to the "Network examples":http://developer.qt.nokia.com/doc/qt-4.7/examples-network.html
Start with the fortune server and client example.