C++ (Qt)QObject *parent1 = parent();Q_ASSERT( parent1 );qDebug() << parent1; QObject *parent2 = parent1->parent();Q_ASSERT( parent2 );qDebug() << parent2; QObject *parent3 = parent2->parent();Q_ASSERT( parent3 );qDebug() << parent3;
C++ (Qt)// Убьется сам{ QSqlQuery q; ...} // Убъем руками{ QSqlQuery *q = new QSqlQuery; ... delete q;}
object_cast<mainWindow *>(parent()->parent()->parent())->ui.actNumberSklad->setText(dirCount);