Hi,
I am trying to set the background image of a QTreeView to a png image via Stylesheet instructions and this works somehow, but it makes the background color of the View turn transparent. If I then set the background-color to anything other than "background-color:transparent;" the background-image disappears. Comment out the background-color instruction in the code below to get the picture ...
Is this a bug in Qt or am I doing something wrong?

Thanx in advance
Momesana

p.s. I am using Qt-4.2.2
Qt Code:
  1. #include <QApplication>
  2. #include <QtGui>
  3.  
  4. int main(int argc, char ** argv)
  5. {
  6. QApplication app(argc, argv);
  7. QTreeView * view = new QTreeView;
  8. view->resize(500, 350);
  9. view->setStyleSheet
  10. (
  11. "QTreeView {"
  12. // "background-color:white;"
  13. "background-image:url(:images/toque.png);"
  14. "background-position:bottom right;"
  15. "background-repeat:none;"
  16. "}"
  17. );
  18. view->show();
  19. return app.exec();
  20. }
To copy to clipboard, switch view to plain text mode