
Originally Posted by
manhds
I would like get Button on QMessageBox because I would like Resize them.
Can You help me?
1. better of creating your own messageBox.
2. If you rather use the QMessageBox you can do the folowings:
const QObjectList * list =box->children();
if(!list)
return NULL;
QObjectListIt it( *list ); // iterate over the buttons
while ( (obj = it.current()) != 0 )
{
if(obj->isA("QPushbutton"))
{
// Do what you need to do.
}
++it;
}
QMessageBox * box;
box = new QMessageBox();
const QObjectList * list =box->children();
if(!list)
return NULL;
QObjectListIt it( *list ); // iterate over the buttons
QObject *obj;
while ( (obj = it.current()) != 0 )
{
if(obj->isA("QPushbutton"))
{
// Do what you need to do.
}
++it;
}
To copy to clipboard, switch view to plain text mode
Bookmarks