Basically this is it.
in main()
MainWindow window;
window.showMaximized();
MainWindow window;
window.showMaximized();
To copy to clipboard, switch view to plain text mode
Then a child widget of MainWindow of class Widget has resizeEvent() reimplemented:
{
nameLabel->setFixedWidth(width()/4);
familyNameLabel->setFixedWidth(width()/4);
}
void Widget::resizeEvent(QResizeEvent *event)
{
nameLabel->setFixedWidth(width()/4);
familyNameLabel->setFixedWidth(width()/4);
QWidget::resizeEvent(event);
}
To copy to clipboard, switch view to plain text mode
No, if I don't call show show() the widgets won't be visible. Reimplement resizeEvent() for any widget, then call showMaximized on the MainWindow, you'll see you'll get 3 calls to resizeEvent(). I commented out all the code to make sure it wasn't doing anything that caused more calls but you still get 3.
The reason why I'm not letting the layout handler do what I do in the resizeEvent() method is because Qt doesn't handle font size properly and I've to do it myself.
Thanks again.
Bookmarks