Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

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

    Tools
    4
    8
    3093
    Loading More Posts
    • 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
      never_ever last edited by

      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 Reply Quote 0
      • N
        never_ever last edited by

        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 Reply Quote 0
        • N
          never_ever last edited by

          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 Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            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 Reply Quote 0
            • N
              never_ever last edited by

              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 Reply Quote 0
              • L
                love8879201 last edited by love8879201

                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 Reply Quote 0
                • M
                  misa3l last edited by

                  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 Reply Quote 0
                  • M
                    misa3l last edited by

                    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 Reply Quote 0
                    • First post
                      Last post