Doubt getting window size
I'm creating an application using QMainWindow.
I'm using a label with a pixmap as a background, but I cannot get the complete window filled with the background image, probably due to the pixmap size. How I could achieve that?
At the same time I would like that if the window is resized background is still filling all the available window
Thanks in advance!!
I'm using a frame instead of a label.
Guess you could just scale the pixmap to the frame/label?
This works for me:
@ QLabel* defaultCentralWidget = new QLabel( this );
defaultCentralWidget->setPixmap( QPixmap( ":/logo/img/logo/logo.png") );
defaultCentralWidget->setAlignment( Qt::AlignCenter );
defaultCentralWidget->setScaledContents( true );
setCentralWidget( defaultCentralWidget );@
take a look at "this thread":http://developer.qt.nokia.com/forums/viewthread/12191 and "this one":http://developer.qt.nokia.com/forums/viewthread/4871