Problems with the Q_OBJECT-Macro
Re: Problems with the Q_OBJECT-Macro
what the strange code
Code:
...
QtExplorer w = new QtExplorer;
w.show();
...
;)
modify it
Code:
...
QtExplorer w;
w.show();
...
Re: Problems with the Q_OBJECT-Macro
Thanks now it works. But what is the difference? Why I cannot call it by the usual methode?
Sincerely Tok
Re: Problems with the Q_OBJECT-Macro
Code:
QtExplorer *w = new QtExplorer();
w->show();
delete w;
or
Code:
QtExplorer w;
w.show();
Once you create the object on the heap, once on the stack.
Code:
QtExplorer w = new QtExplorer();
is just invalid code...
Re: Problems with the Q_OBJECT-Macro
Okay thank you.
The reason why I changed it to a new()-constructor is, that I cannot debug the small program. If I start the debugger (under Eclipse Qt-integration, Linux) I get the message "No symbol "new" in current context." on the eclipse-console. I thought this isn't serious but I tied with a new()-operator.
I start debugging with the main-method (obvious) but if I jump to the construction point ( QtExplorer w; ) the sourcecode-window is closed with a message "No source available for "" " and if I go one step further, the whole execution stops with the message "Cannot find bounds of current function".
What is the meaning of that? (I installed the libqt-dbg!)
Thank you in advance
Sincerely Tok
Re: Problems with the Q_OBJECT-Macro
Ahhh, Im one step further.
But now gdb on eclipse stucks with the message:
Quote:
Can't find a source file at "widgets/qlineedit.h"
Locate the file or edit the source lookup path to include its location.
So where should this source-code installed? I thought I have it all with the qt4-dev-package of debian?
Thank you
Sincerely Tok
Re: Problems with the Q_OBJECT-Macro
a) did you use #include <QLineEdit>?
b) Look, if under project->properties->C++ Include paths the right directories are set.