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
Regular Contributor
leppa
Posts: 70
Registered: ‎02-01-2013
My Carrier: blau.de

Re: #include <QtNetwork> fails


ingvar_e wrote:

I made a try with the new code after correcting the discrepancy on   application.hpp/applicationui.hpp

 

Regardless if I set the

 

QT += network

 

or not

 

I get question maqrks on almost everything related to "Q"  Must be a library missing??


What IDE do you use (Qt Creator or Momentics)? Could your SDK installation be broken?

--
With best regards,
Oleksii Serdiuk
Please use plain text.
Developer
ingvar_e
Posts: 551
Registered: ‎10-31-2009
My Carrier: Movistar, Telenor

Re: #include <QtNetwork> fails

thanks robbieDubya

 

"someone"  ought to fix the documentation.  And also really test that what they put up as educational samples really work.


As a contractual developer  these kind of things makes for many hours of unpaid frustration.  And I have had quite a few of them

If everything seems to be under control, you're just not driving fast enough
-Mario Andretti-
Please use plain text.
BlackBerry Development Advisor (Retired)
robbieDubya
Posts: 418
Registered: ‎07-18-2012
My Carrier: Bell Canada

Re: #include <QtNetwork> fails


leppa wrote:
It should. Else, it's a bug. Qt always ships Qt<Module> header which, basically, conatins a bunch of includes of all the headers from the module. This saves you from including each class's header explicitly but may increase compilation time due to bloating the number of included files.

Yes - there are two copies included in the download bundle - but - when you know where they are under the include root - you can specify them fully.

 

#include <qt4/Qt/QtNetwork> 

#include <qt4/QtNetwork/QtNetwork>

 

however,

 

#inclue <QtNetwork> does not exist - unless you have tweaked include paths.

 

Thanks!

--
Rob is no longer associated with BlackBerry.
Please use plain text.
BlackBerry Development Advisor (Retired)
robbieDubya
Posts: 418
Registered: ‎07-18-2012
My Carrier: Bell Canada

Re: #include <QtNetwork> fails

I will make sure the right team sees this thread to get the sample tidied up.

--
Rob is no longer associated with BlackBerry.
Please use plain text.
Developer
ingvar_e
Posts: 551
Registered: ‎10-31-2009
My Carrier: Movistar, Telenor

Re: #include <QtNetwork> fails

robbieDubia wrote:

"I will make sure the right team sees this thread to get the sample tidied up."

 

That would be nice. I have solved the QtNetwork problem by include QtNetwork/QtNetwork.

 

I have basically the same problem with

 

QObject, QFile and QString 

 

Did not find them. Where are they?

If everything seems to be under control, you're just not driving fast enough
-Mario Andretti-
Please use plain text.
Developer
ingvar_e
Posts: 551
Registered: ‎10-31-2009
My Carrier: Movistar, Telenor

Re: #include <QtNetwork> fails

robbieDubia wrote:

"I will make sure the right team sees this thread to get the sample tidied up."

 

That would be nice. I have solved the QtNetwork problem by include QtNetwork/QtNetwork.

 

I have basically the same problem with

 

QObject, QFile and QString 

 

Did not find them. Where are they?

If everything seems to be under control, you're just not driving fast enough
-Mario Andretti-
Please use plain text.
BlackBerry Development Advisor (Retired)
robbieDubya
Posts: 418
Registered: ‎07-18-2012
My Carrier: Bell Canada

Re: #include <QtNetwork> fails

That sounds like a config / project problem.

 

Is the project created as a Cascades project?

 

Here are the include paths I see when I create a Cascades project;

 

My Include Paths

 

QString is under qt4/QtCore - so I don't need to fully specify it...

--
Rob is no longer associated with BlackBerry.
Please use plain text.
Regular Contributor
leppa
Posts: 70
Registered: ‎02-01-2013
My Carrier: blau.de

Re: #include <QtNetwork> fails


robbieDubya wrote:

leppa wrote:
It should. Else, it's a bug. Qt always ships Qt<Module> header which, basically, conatins a bunch of includes of all the headers from the module. This saves you from including each class's header explicitly but may increase compilation time due to bloating the number of included files.

Yes - there are two copies included in the download bundle - but - when you know where they are under the include root - you can specify them fully.

 

#include <qt4/Qt/QtNetwork> 

#include <qt4/QtNetwork/QtNetwork>

 

however,

 

#inclue <QtNetwork> does not exist - unless you have tweaked include paths.

 

Thanks!


That's exactly what

QT += network

does: it adds qt4/QtNetwork to include paths and does some other tweaking (like updating list of linked libraries) so you can build against Qt Network module. And that should be all you need to do to be able to use the module.

--
With best regards,
Oleksii Serdiuk
Please use plain text.
Developer
ingvar_e
Posts: 551
Registered: ‎10-31-2009
My Carrier: Movistar, Telenor

Re: #include <QtNetwork> fails

I started the project as described

 

----snip  ---

To start, you must create a BlackBerry Cascades C++ project using the Standard empty project template. For more information on creating a project, see Creating projects and targets.

---- snip ----

 

Under the "include"  I only have 3 includes:

 

qnx6/usr/include

qnx6/usr/include/cpp

qnx6/usr/include/cpp/c

 

If everything seems to be under control, you're just not driving fast enough
-Mario Andretti-
Please use plain text.
Developer
ingvar_e
Posts: 551
Registered: ‎10-31-2009
My Carrier: Movistar, Telenor

Re: #include <QtNetwork> fails

I give up.

 

Tried a few more changes along the same lines but still got flags. Someone more experienced than me has to fix this sample

If everything seems to be under control, you're just not driving fast enough
-Mario Andretti-
Please use plain text.