Hello friends,

when I create a tabwidget say like this :

Qt Code:
  1. m_qtbw_myTab = new QTabWidget(this);
  2.  
  3. for (int i = 0; i < m_DetailInfos.size(); ++i)
  4. {
  5. QWidget* customWidget1 = new QWidget(m_qtbw_OrderTab) ;
  6. QGridLayout* myLayout = new QGridLayout();
  7. QLabel * qlbl_Nr = new QLabel(tr("Auftrag"),customWidget1);
  8. qlbl_Nr->setObjectName("qlbl_Nr_"+m_DetailInfos.at(i).value(0).toString());
  9. QLineEdit * qle_Nr = new QLineEdit(customWidget1);
  10. qle_Nr->setObjectName("qle_Nr_"+m_DetailInfos.at(i).value(0).toString());
  11. qle_Nr->setText(m_DetailInfos.at(i).value(0).toString());
  12. qle_Nr->setEnabled(false);
  13. myLayout->addWidget(qlbl_Nr,0,0,1,1,Qt::AlignLeft);
  14. myLayout->addWidget(qle_Nr,0,1,1,1,Qt::AlignLeft);
  15. customWidget1->setLayout(myLayout);
  16.  
  17. m_qtbw_myTab->addTab(customWidget1,m_DetailInfos.at(i).value(0).toString());
  18. }
To copy to clipboard, switch view to plain text mode 

And I want access the widget in a special tab I do that with:
Qt Code:
  1. QWidget * myWidget = qobject_cast<QWidget *>(m_qtbw_myTab->widget(0));
To copy to clipboard, switch view to plain text mode 

But what about accessing the Lineedit in a Widget??

I see the children during debugging and try this:

Qt Code:
  1. QLineEdit * myedit = qobject_cast<QLineEdit *>(myWidget->childAt(1,0));//lineedit
To copy to clipboard, switch view to plain text mode 

but I get a crash.

Can I access the components on the widget without subclassing the Widget??

Thanx in advance.