Try it with additional parentheses:
stemp = qobject_cast<ScreenHead*>(slidingStacked->currentWidget());
if (stemp)
{
mtemp = qobject_cast<menu_screen*>(stemp->pSliding->currentWidget());
if (!mtemp) qDebug() << "mtemp casting failed";
} else qDebug() << "stemp casting failed";
stemp = qobject_cast<ScreenHead*>(slidingStacked->currentWidget());
if (stemp)
{
mtemp = qobject_cast<menu_screen*>(stemp->pSliding->currentWidget());
if (!mtemp) qDebug() << "mtemp casting failed";
} else qDebug() << "stemp casting failed";
To copy to clipboard, switch view to plain text mode
Aah: Too slow :->
Joh
Bookmarks