Hi there,
I have some strange problem with the qobject_cast. I was successfully using the same code at the another class and after I moved the code to the new class it won't work anymore. If I build the project with the debug configuration and run it at the debug mode I can't even debug it normally because debugger stops automatically at the qmetaobject.cpp files "QObject *QMetaObject::cast(QObject *obj) const" function. And this happens even though I haven't set the breakpoint in it... And it won't continue debugging through there even I press "Continue".
Here's the code where I use qobject_cast... the problem goes away if I comment out these lines. So the problem should be related to this, I assume
Note that at the code the "component" is type QWidget *component
Qt Code:
{ options = componentOptions; { if(options == "horizontal") slider->setOrientation(Qt::Horizontal); } { button->setText(options); } }To copy to clipboard, switch view to plain text mode
Probably it is just some stupid mistake like usually
Any help would be greatly appreciated.
Bookmarks