How do I get the final height of a widget that was just added to a layout, but because of this, it has not resized to its final size?
Basically I need to do this:
myGridLayout->addWidget ( somewidget, 0, 0, 1, 1 );
QPushButton *b = new QPushButton(somewidget);
b->setGeometry( somewidget->width() - 50,
somewidget->height()/2 - 150,
50, 300);
What I want to do is to insert a button (50x300) in the middle of the right edge of the just added widget, but for this I need to know the dimensions of the widget, which I'm not getting correctly because it has not resized to its full size in the layout. Any ideas?