I finally realized i needed a resource file for the main window form to display a background image. Now the other widgets are all taking on the background image. I tried to set the border of a button to black and the whole button except for the text vanished.

I cant stylize any widgets now. The background image is yellow and black. Every time i add a button it turns yellow.

Heres part of the file:

Qt Code:
  1. QPalette palette;
  2. MainWindow->setPalette(palette);
  3. QIcon icon;
  4. icon.addFile(QString::fromUtf8(":/newPrefix/images/window_icon.png"), QSize(), QIcon::Normal, QIcon::Off);
  5. MainWindow->setWindowIcon(icon);
  6. MainWindow->setAutoFillBackground(false);
  7. MainWindow->setStyleSheet(QString::fromUtf8("background-image: url(:/newPrefix/images/500px-Anarcho-capitalist_flag.svg.png); no-repeat;\n"
  8. ""));
To copy to clipboard, switch view to plain text mode 

Im using Qt Designer 4.6.2 on ubuntu lucid