PDA

View Full Version : Qt and eclipse



Arifa
6th August 2010, 09:27
Hi,

I was able to generate the moc files in eclipse but I get this error

Object::connect: No such slot QCoreApplication::issue(QNetworkReply*) in ../qt.cpp:16


which I think is because of moc file not being read.

I have changed the build settings to generate the moc file.Anyother thing that I am missing.

Thanks in advance
Arifa

Zlatomir
6th August 2010, 16:30
Make sure you connect the right objects, (in your case, are you sure that you need to connect to QCoreApplication object?)
QCoreApplication does not have the slot called 'issue'
From what i can tell, by the parameter list you need "some" Qt networking object (i don't know witch one), check your code, or examples (online or the ones that come with Qt SDK)

[off-topic]
Please don't use the visitor messages to ask for help (they are usually ignored) and if i know the answer, i won't keep it to myself (i think this is valid for anybody else here on qtcentre ;) )

Lykurg
17th August 2010, 08:07
Instead of writing me a private message with the needed source code you would better have posted it here in the right place. We all are glad to help, but we hate questions via private messages!


qt::qt(QCoreApplication* app)
{
manager = new QNetworkAccessManager(this);
connect(manager, SIGNAL(finished(QNetworkReply*)), app, SLOT(issue(QNetworkReply*)));
}

void qt::issue(QNetworkReply *networkReply)
{
//...
}

not your application has the slot, but you own class, so use this instead of app in you connect statement.