Quantcast
Channel: Installation and Deployment
Viewing all articles
Browse latest Browse all 22112

How to get Qwidget that added to Vertical lay out

$
0
0
Hi, i add Some Widget to a Vertical lay out. now i want retrieve them like this:    for(int i =0; i < ui->verticalLayout_6->children().count(); i++)         {             QWidget* Widget = dynamic_cast<QWidget*>(ui->verticalLayout_6->children().at(i));             if(Widget != NULL)             {                 for(int j = 0; j < Widget->children().count(); j++)                 {                     QLineEdit *TempLine = dynamic_cast<QLineEdit*>(Widget->children().at(j));                     if(TempLine != NULL)                     {                         TempLine->setText("peida kardam :D :P");                     }                 }                 }             } but ui->verticalLayout_6->children().count(); returns 0. how can i retrieve them? any idea? another question is that how can change space between Pushbuttons that added to Vertical lay out. I use  ui->verticalLayout->setSpacing(1); but i doesn’t work. any idea?

Viewing all articles
Browse latest Browse all 22112

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>