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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 554
Registered: ‎10-31-2009
My Device: Torch 9800, Bold 9700
My Carrier: Movistar, Telenor
Accepted Solution

#include <QtNetwork> fails

http://developer.blackberry.com/cascades/documentation/device_comm/networking/index.html

 

HTTP Networking sample.

 

The include  #include <QtNetwork>  gets error message  "No such file or directory"

If everything seems to be under control, you're just not driving fast enough
-Mario Andretti-
Regular Contributor
Posts: 71
Registered: ‎02-01-2013
My Device: BlackBerry Z10 Limited Edition
My Carrier: blau.de

Re: #include <QtNetwork> fails

[ Edited ]

Did you add

QT += network

 to your .pro file?

--
With best regards,
Oleksii Serdiuk
Developer
Posts: 554
Registered: ‎10-31-2009
My Device: Torch 9800, Bold 9700
My Carrier: Movistar, Telenor

Re: #include <QtNetwork> fails

When going back to check the sample I can see  it is being changed!


Include statement in applicationui.cpp  says

#include "applicationui.hpp"

 

but the hpp file is named named "application.hpp"

 

And other changes.

 

I sure hope that the person now doing the changes also really test the code. I will do nothing more until tomorrow

 

If everything seems to be under control, you're just not driving fast enough
-Mario Andretti-
Developer
Posts: 554
Registered: ‎10-31-2009
My Device: Torch 9800, Bold 9700
My Carrier: Movistar, Telenor

Re: #include <QtNetwork> fails

thanks  leppa.

 

Did not see that mentioned in the article.

If everything seems to be under control, you're just not driving fast enough
-Mario Andretti-
Regular Contributor
Posts: 71
Registered: ‎02-01-2013
My Device: BlackBerry Z10 Limited Edition
My Carrier: blau.de

Re: #include <QtNetwork> fails

As a rule of thumb, to include Qt<Module> in your app you should always add QT += <module> to your .pro file (unless it was implicitly included by another module).

 

PS: If my first reply helped, you can perss "Accept as Solution" on it. This will add "Go to Solution" link at the end of your original post so other people can quickly find it.

--
With best regards,
Oleksii Serdiuk
Developer
Posts: 554
Registered: ‎10-31-2009
My Device: Torch 9800, Bold 9700
My Carrier: Movistar, Telenor

Re: #include <QtNetwork> fails

Still having problems

If everything seems to be under control, you're just not driving fast enough
-Mario Andretti-
Developer
Posts: 196
Registered: ‎03-04-2013
My Device: BB Z10
My Carrier: Rogers

Re: #include <QtNetwork> fails

[ Edited ]

Hey there...

 

Try adding the individual header files within the QtNetwork folder that you need for your app...

 

Example:

#include <QtNetwork/qnetworkaccessmanager.h>
#include <QtNetwork/qnetworkconfigmanager.h>

 

As reference it's located at:

\bbndk\<target OS>\qnx6\usr\include\qt4\QtNetwork

 

Highlighted
Retired
Posts: 418
Registered: ‎07-18-2012
My Device: Q10
My Carrier: Bell Canada

Re: #include <QtNetwork> fails

You can't

#include <QtNetwork>

because it doesn't exist.

 

Have a look under your NDK's target_10_x_y_z/qnx6/usr/include directory.

 

One way to get what you want is use the path relative to there. eg:

 

#include <qt4/QtNetwork/QNetworkAccessManager>

 

--
Rob is no longer associated with BlackBerry.
Developer
Posts: 554
Registered: ‎10-31-2009
My Device: Torch 9800, Bold 9700
My Carrier: Movistar, Telenor

Re: #include <QtNetwork> fails

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??

If everything seems to be under control, you're just not driving fast enough
-Mario Andretti-
Regular Contributor
Posts: 71
Registered: ‎02-01-2013
My Device: BlackBerry Z10 Limited Edition
My Carrier: blau.de

Re: #include <QtNetwork> fails

[ Edited ]


robbieDubya wrote:

You can't

#include <QtNetwork>

because it doesn't exist.

 


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.

--
With best regards,
Oleksii Serdiuk