[Qt-interest] How to add a background image for MainWindow
Girish Ramakrishnan
girish at forwardbias.in
Thu Jun 18 05:14:51 CEST 2009
Kermit Mei wrote:
> Hello, community!
>
> I implemented a MainWindow which inherited from QWidget. Now, I need to
> add an background for it. I use
> setStyleSheet("background-image: url(:/images/background.jpg)");
> in MainWindow::MainWindow(...), but all the widgets include all the
> buttons on it has a background from background.jpg, it looks very
> confused.
>
Maybe you should set the stylesheet on the centralWidget() and not
QMainWindow?
Girish
More information about the Qt-interest-old
mailing list