Hi all!
I have a weird issue:
I use the QStackedWidget, and i place inside it objects of a class that declared like this:
{
Q_OBJECT
...
class ScreenHead: public QWidget
{
Q_OBJECT
...
To copy to clipboard, switch view to plain text mode
Now, ScreenHead also has some members, and one of it is another QStackedWidged that contains several objects of this class:
{
Q_OBJECT
...
class menu_screen : public QGraphicsView
{
Q_OBJECT
...
To copy to clipboard, switch view to plain text mode
Well, the problem is, that when i do that:
ScreenHead* stemp;
menu_screen* mtemp;
stemp = (ScreenHead*) firstLevelStackedWidget->currentWidget();
mtemp = (menu_screen*) stemp->secondLevelStackedWidget->currentWidget();
ScreenHead* stemp;
menu_screen* mtemp;
stemp = (ScreenHead*) firstLevelStackedWidget->currentWidget();
mtemp = (menu_screen*) stemp->secondLevelStackedWidget->currentWidget();
To copy to clipboard, switch view to plain text mode
I got a segmentation fault on it.
In another place, when i do this:
stemp = (ScreenHead*) firstLevelStackedWidget->currentWidget();
qDebug() << "stemp =" << stemp;
stemp = (ScreenHead*) firstLevelStackedWidget->currentWidget();
qDebug() << "stemp =" << stemp;
To copy to clipboard, switch view to plain text mode
i get:
stemp = menu_screen(0x1dbdd8)
I don't understand why is that and what is wrong?
someone can help me?
Bookmarks