PDA

View Full Version : Background image and semitransparent widget



asieriko
20th August 2007, 15:07
Hello,
I'm trying to put a background image beside some qlistview widgets. So I think that I've to made them semitransparent.
I've tried different aproaches but I can't get a semitransparent widget.
How can I do it?
Thanks in advance.

marcel
20th August 2007, 15:10
If you want a semitransparent list view the use QWidget::setWindowOpacity(0.5);

Regards

asieriko
20th August 2007, 16:31
If i try the following code, I can't see the mainwindow's yellow color. But I can if I remove the setCentralWidget(a);


QListWidget *a = new QListWidget();
setStyleSheet("QMainWindow {background-color: yellow}");
a->setWindowOpacity(0.5);
setCentralWidget(a);

asieriko
20th August 2007, 17:43
I want something like the attatched image, with designer I've selected QlistWidgets frame, as Qt::StyledFrame, and in this case it works, but i can't get it coding.