errors qdnslookup
Unsolved
Spanish
-
Hi i use this code:
void MainWindow::lookupServers()
{
// Create a DNS lookup.
QDnsLookup dns = new QDnsLookup(this);
connect(dns, SIGNAL(finished()),
this, SLOT(handleServers()));// Find the XMPP servers for gmail.com
dns->setType(QDnsLookup::SRV);
dns->setName("_xmpp-client._tcp.gmail.com");
dns->lookup();
}Errors:
error: conversion from 'QDnsLookup*' to non-scalar type 'QDnsLookup' requested
QDnsLookup dns = new QDnsLookup(this);
error: no matching function for call to 'MainWindow::connect(QDnsLookup&, const char*, MainWindow* const, const char*)'
this, SLOT(handleServers()));
C:\Qt\Qt5.2.0\Tools\QtCreator\bin\qdnslookup\mainw indow.cpp:30: error: base operand of '->' has non-pointer type 'QDnsLookup'
dns->setType(QDnsLookup::SRV);
^