Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Q_OBJECT not found: (10 Items)
   
Q_OBJECT not found  
Hi again :)

I have a new problem:

I transported my Qt program to QNX Momentics to work with the debug tool.
Now I get the following error if I try to debug:

>>No line 33 in file "communication.h".
>>mi_cmd_var_create: unable to create variable object

Where line 33 is the line with the Q_OBJECT - Makro. 

this kommunikation.h is defined as: "class Communcation : public QObject"  and is startet in a seperate Thread via ->
moveToThread(thread)
( thread is a QThread started earlier)

and also this error if the thread is started (breakpoint in communication.cpp at the constructor):
>>Stopped due to shared library event
>>No line 33 in file "kommunikation.h".
>>mi_cmd_var_create: unable to create variable object
>>No line 33 in file "kommunikation.h".
>>no `this' in nameless context

I think this problem points to the Q_OBJECT Macro which cannot be found, but what can I do?
Re: Q_OBJECT not found  
You MUST run qmake to create a valid makefile for Qt.  Then, create a Momentics "Makefile Project" (not QNX C/C++). and 
add the files AND makefile to the project.
Re: Q_OBJECT not found  
Yeah, I know :)

I copied the .cpp and .h files from my Qt project to another folder.
Let "qmake_qnx armv7", "make clean", "make" run.
And put the resulting .pro and makefile with the .cpp and .h files to the project folder of Momentics.

Project is a C++ - project where I deliver the makefile myself.

I followed for this the documentation of:
 http://community.qnx.com/sf/discussion/do/listPosts/projects.qt/discussion.general.topc21467
Re: Q_OBJECT not found  
Is this Qt4 or Qt5?
Re: Q_OBJECT not found  
Qt 4.7
Re: Q_OBJECT not found  
What I also found out just now:

This problem is occuring with the debugger. 
Now I tried the program without the debugger (the same binary) and put some qDebug() calls into the program.
Without the Debugger the program is working and also the second thread is running.
The point where I put the breakpoint before and where the program exited (with the mentioned error) is not a problem 
(looks like) and the next line in code is executed (where I put the qDebug).
Re: Q_OBJECT not found  
At the moment I debug with qDebug() :)
So for now it is working! (But if you have an idea, pls tell me)

another question:
everytime I start my program on QNX I get a mousecursor
-> How can I remove this cursor? 
Re: Q_OBJECT not found  
Re: Q_OBJECT not found  
The commands did not work, maybe because of the splashScreen they discussed there.
But I added like the last post a -nomouse to the environment arguments.
Now there is no mouse cursor.

If this was a good decision, i will see later :)
hope I won´t need the mouse^^
Re: Q_OBJECT not found  
AND..

her is some variation of the errors :)  I think it was there before, but I forgot to write it in here.
This looks like it happens after starting the new thread:

>>Stopped due to shared library event
>>No line 137 in file "kommunikation.h".
>>mi_cmd_var_create: unable to create variable object
>>No line 137 in file "kommunikation.h".
>>mi_cmd_var_create: unable to create variable object
>>[New pid 290829 tid 2]
>>[Switching to pid 290829 tid 2]
>>Cannot access memory at address 0x0
>>no `this' in nameless context

the missing line is a commented line.
But the access memory and "this" error is strange.