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.

Posts: 20
Registered: ‎07-23-2013
My Device: Z10
My Carrier: *
Accepted Solution

Problems including QObject

[ Edited ]



I have a fresh static library project, inside it... a TestObject.h file. I added the QtCore library via the "Add Library..." method hoping it would solve my issue. Below is my class... 



#include <QObject>

class TestObject {

	virtual ~TestObject();

#endif /* TESTOBJECT_H_ */

This compiles, until I include <QObject> as seen above.


The following is the compiler error output, what am I doing wrong?


In file included from /Applications/bbndk/target_10_1_0_4633/qnx6/usr/include/qt4/QtCore/QObject:1:0,

                 from ../src/TestObject.h:11,

                 from ../src/TestObject.cpp:8:

/Applications/bbndk/target_10_1_0_4633/qnx6/usr/include/qt4/QtCore/qobject.h:47:32: fatal error: QtCore/qobjectdefs.h: No such file or directory

compilation terminated.


Thank you


Posts: 20
Registered: ‎07-23-2013
My Device: Z10
My Carrier: *

Re: Problems including QObject

I managed to solve the problem by including the qt4 base directory amongst my includes.



I hope this helps someone.