Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 64
Registered: ‎09-10-2012
My Device: Developer

Re: QObject unresolved inclusion

[ Edited ]

Thanks for the answer.

 

I read all this after having done another clean install. I made another project from scratch and I had to do small changes, like adding QtNetwork/ to  <QNetworkAccessManager>

and in the post you refer to it says: "The difference is only that in the Gold release it appears to work on the first time you create a new project in the IDE. But as soon as you restart the IDE the problem is back."

So I guess it is a quick fix because I reinstalled it, but on new projects I'll have to go through the hassle (unless they patch it). In the Includes section there are 9 items (include, cpp, cpp/c, freetype2, qt4, qt4/QtCore, qt4/QtDeclarative, a gcc one and an armv7 one). Yesterday there were only 4 or so.

 

Yesterday I had reinstalled the SDK, but the first projects I created were examples, so when I did the important one, the fix didn't work (or I was too tired/grumpy to realize I had to do the small changes I did today).

 

Cheers

Pepe

 

Update:

Welly well, I closed and reopened the SDK and most Includes are gone.

Also, the Build and Run configurations got all screwed up. If I build for Simulator-Debug and then attempt to run on Simulator-Debug, it says I'm trying to run a program made for device on the simulator : /

Developer
Posts: 28
Registered: ‎02-24-2012
My Device: BlackBerry Z10 Limited Edition

Re: QObject unresolved inclusion

Do not touch the "Project-> add librabry" thing, just make an "include <someLibrary>" statement and it's work fine, sometimes you need to specify includes in .pro file but it's rare, look on BB10 cascades documentation, they'll tell you if an element needs .pro inclusion (Usually for big libraries like QNetwork or QSQL).

Also, if you have syntax error on QObject in your header file, just try to recompile with "Device-debug" build, and it will go, if not just ignore it, if "include <QObject>" has no syntax error, everything is fine.

New Developer
Posts: 13
Registered: ‎04-15-2012
My Device: non-blackberry

Re: QObject unresolved inclusion

Hi there,

I have encountered this problem before for Gold release. Try adding this line at .pro file. (before CONFIG)

QT += core network
Developer
Posts: 570
Registered: ‎10-17-2010
My Device: (BlackBerry Z10)-> Q10/Passport Dual Use

Re: QObject unresolved inclusion - QNetworkAccessManager QNetwork Reply

I don't know what happened. Maybe its the fact that my IDE kept crashing and becoming unresponsive... 

 

Getting "UnRESOLVeD INclUSION" errors in my header files when i include QNetworkaccessmanager.

 

SOMEONE HELP. this is critical to all my apps trying to access the internet to pull data.

Developer
Posts: 64
Registered: ‎09-10-2012
My Device: Developer

Re: QObject unresolved inclusion - QNetworkAccessManager QNetwork Reply

Does it work with <QtNetwork/QNetworkAccessManager> ?

Not just <QNetworkAccessManager>

Developer
Posts: 570
Registered: ‎10-17-2010
My Device: (BlackBerry Z10)-> Q10/Passport Dual Use

Re: QObject unresolved inclusion - QNetworkAccessManager QNetwork Reply

No it does not work. I will try to uninstall the IDE/SDK and see if this solves the inclusion issue.

Developer
Posts: 47
Registered: ‎11-23-2010
My Device: Q10

Re: QObject unresolved inclusion - QNetworkAccessManager QNetwork Reply

Just happened with me after I added couple files (1 cpp and 1 hpp) into my project from another one. It appeared that this class uses QNetworkAccessManager. All Qt related includes became "unresolved inclusion".

 

My solution was:

1. remove those 2 from the project.

2. Clean and Build the project

3. Added those 2 files again.

4. Build

 

Problem dissappeared. It looks like some shaman's magic. Still puzzles me what and why did happen.