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. QUdpSocket
Forum Updated to NodeBB v4.3 + New Features

QUdpSocket

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 3.0k Views 1 Watching
  • 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.
  • C Offline
    C Offline
    cmt75827
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      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.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • C Offline
        C Offline
        cmt75827
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • K Offline
          K Offline
          koahnig
          wrote on last edited by
          #4

          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.

          Vote the answer(s) that helped you to solve your issue(s)

          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