QTabWidget background not transparent
-
wrote on 4 May 2015, 19:49 last edited by sharethl 5 May 2015, 16:03
Does anyone know why qTab is not transparent?
I have a control on the back, but still covered by QTab. Right side is a button stackedWidget(didn't set stylesheet for StackedWidget) .ui->tabWidget->setAttribute(Qt::WA_TranslucentBackground); ui->tabWidget->setStyleSheet("background-color: transparent"); ui->tab->setAttribute(Qt::WA_TranslucentBackground); ui->tab->setStyleSheet("background-color: transparent"); ui->tab_2->setAttribute(Qt::WA_TranslucentBackground); ui->tab_2->setStyleSheet("background-color: transparent");
Thanks
-
wrote on 4 May 2015, 20:53 last edited by
Try using:
QWidget::setAttribute(Qt::WA_TranslucentBackground);
-
wrote on 5 May 2015, 14:56 last edited by T3STY 5 May 2015, 14:57
the ui->tabWidget widget is the main tabs container, right? It might be that you need to set translucent background and transparent background color on all the child widgets of it. Or viceversa.
-
the ui->tabWidget widget is the main tabs container, right? It might be that you need to set translucent background and transparent background color on all the child widgets of it. Or viceversa.
-
wrote on 5 May 2015, 21:47 last edited by
While looking for similar problems on google I found this:
http://www.qtforum.org/post/96233/qtabwidget-background-color-problem.html#post96233I can see from your screenshot that you're not on Windows, but maybe the trick still does the job. Other than that, I found other issues with background transparency related to Qt 4, but nothing else.
-
While looking for similar problems on google I found this:
http://www.qtforum.org/post/96233/qtabwidget-background-color-problem.html#post96233I can see from your screenshot that you're not on Windows, but maybe the trick still does the job. Other than that, I found other issues with background transparency related to Qt 4, but nothing else.
7/7