Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. [solved] "QDnsLookup requires a QCoreApplication" - app output (qxmpp)

[solved] "QDnsLookup requires a QCoreApplication" - app output (qxmpp)

Scheduled Pinned Locked Moved Qt Creator and other tools
8 Posts 4 Posters 3.6k Views
  • 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.
  • N Offline
    N Offline
    never_ever
    wrote on last edited by
    #1

    Hi,
    I'm trying to connect to server, but I can't - there is no error - only when I push the button "Connect" in my app I get this (in application output): "QDnsLookup requires a QCoreApplication" in place where I tries to connect to server
    @ userClient->connectToServer(config);@

    as it could be some mistake in qxmpp library, but it happens only on my PC computer, on my second computer it works fine.

    1 Reply Last reply
    0
    • N Offline
      N Offline
      never_ever
      wrote on last edited by
      #2

      I should also mention, that on PC server is running on virtual machine, and on other computer it isn't on virtual machine.

      1 Reply Last reply
      0
      • N Offline
        N Offline
        never_ever
        wrote on last edited by
        #3

        Now I write some code for check error (using error signal for QXmppClient).
        I get socket error, but as I mentioned it happens only on computer where is virtual machine, on my computer it works fine.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          Without more information it will be difficult to help you. What version of Qt are you using on what OS ?

          What error are you getting ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • N Offline
            N Offline
            never_ever
            wrote on last edited by
            #5

            On PC and on laptop I have Win7.
            Qt 5.1.1

            In constructor:
            @
            userClient=new QXmppCLient();
            connect(userClient,SIGNAL(error(QXmppClient::Error)),this,SLOT(getError(QXmppClient::error)));
            @

            in on_pbConnect_clicked():
            @
            QXmppConfiguration config;

            config.setUser(userName);
            config.setPassword(password);
            config.setHost(serverAddress);
            userClient->connectToServer(config);
            @
            userName, password, serverAddres (as IP address) I get from text fields.
            in getError:
            @
            if(e==QXmppClient::SocketError) ui->teMessage->append("Socket error");
            else if(e==QXmppClient::KeepAliveError) ui->teMessage->append("Keep Alive Error");
            else if (e==QXmppClient::XmppStreamError) ui->teMessage->append("Stream Error");
            else if(e==QXmppClient::NoError) ui->teMessage->append("No error");
            @

            I don't get any error while debugging or compiling. I can't connect to server. Before I add getError(QXmppClient::Error e) method in application output I got an information that "QDnsLookup requires a QCoreApplication". Now in my app in teMessage field I get that this is socket fault (SocketError).

            1 Reply Last reply
            0
            • L Offline
              L Offline
              love8879201
              wrote on last edited by love8879201
              #6

              i have same problem like this, so what is the answer for it?

              edit :
              i solved it, below is my solution

              Android:
              i had find out it needed to be use QCoreApplication.
              so, i create thread on android for it.

              Windows:
              you need to use same mode(debug or release) when you build your lib

              e.g.
              you use qxmpp, and build qxmpp in debug, you have to build your own project in debug when you use qxmpp.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                misa3l
                wrote on last edited by
                #7

                hello i have 2 error. using qxmpp..

                mar feb 10 00:17:24 2015 DEBUG Looking up server for domain jabber.com
                QDnsLookup requires a QCoreApplication

                Images:

                http://picpaste.com/qxmpperror-Nung87qj.jpg

                http://picpaste.com/qxmpperror2-tPVEI9FC.jpg

                Please Help me..

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  misa3l
                  wrote on last edited by
                  #8

                  hello i have 2 error. using qxmpp..

                  mar feb 10 00:17:24 2015 DEBUG Looking up server for domain jabber.com
                  QDnsLookup requires a QCoreApplication

                  Images:

                  http://picpaste.com/qxmpperror-Nung87qj.jpg

                  http://picpaste.com/qxmpperror2-tPVEI9FC.jpg

                  Please Help me..

                  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