qobject_cast<mainWindow *>(parent()->parent()->parent())->ui.actNumberSklad->text();
qobject_cast<mainWindow *>(parent()->parent()->parent())->ui.actTovCat;
C++ (Qt)mainWindow *w = qobject_cast<mainWindow *>(parent()->parent()->parent());if (w){ w->ui.actNumberSklad->text();}else{ qDebug() << "Kemuto herovato";}
mainWindow *w = qobject_cast<mainWindow *>(parent()->parent()->parent()); if (w) { dirCount = w->ui.actNumberSklad->text(); } else { QMessageBox::information(0, "", "Khernya kakaya-to"); }
fMyOrg *child = new fMyOrg;child->dirCount = dirCount;
C++ (Qt)mainWindow::mainWindow(...){ m_setupWidget = new SetupWidget( this ); connect( m_setupWidget, SIGNAL( changedParameter1( int ) ), SLOT( setData( int ) ) ); connect( m_setupWidget, SIGNAL( changedParameter2( const QString & ) ), SLOT( setText( const QString & ) ) );}
struct Settings { double mRatio; ...};void SetupWidget::DoSomething( void ){ int mode = GetCurrentMode(); ... if (useSettings) { Settings theS; MainWindow::Instance()->BuildSettings(&theS, mode); if (theS.mRatio != 1.0) { ... } }}