Important: Please read the Qt Code of Conduct -

[Solved] How Can I make the QToolBox panel transparent?

  • Is there a Sub-Controls like QToolBox::tab make the Qwidget in QToolBox transparent?
    I tryed:

    1. QWidget#page{background:rgb(12,34,56);}
      this work, but
      this one not work.
      I guess there maybe a Sub-Controls like QToolBox::tab.
      is it?
      How Can I reach my purpose?

  • Hi,

    did you try "background: rgba(12,34,56,0);" ??


  • Thanks for Antonio Di Monaco's reply.
    "background: rgba(12,34,56,0)" can't work too.
    From the source code, I found out that QToolBox is made up by :
    @ QToolBoxButton *button;
    QScrollArea *sv;
    QWidget *widget;@
    I tryed :
    in toolbox's "change stylesheet" menu.
    this can change the toolbox transparent.

  • Hello,

    @QToolBox QWidget
    background-color: background: rgba(12,34,56,0);

    but also makes transparent the sub-controls of the QWidget from QToolBox

    sorry for my bad (bing-translator) english


  • Moderators

    try setting the following on the Toolbox window:
    (beside your stylesheet declaration)

    or another possibility: "QGraphicsOpacityEffect":
    But this also applies for the child widgets.

    btw: This is no valid stylesheet declaration AFAIK.
    [quote author="ChanchoCiego" date="1365190604"]Hello,
    @QToolBox QWidget
    background-color: background: rgba(12,34,56,0);

    Also a nice trick i used to do was setting the background color not to fully transparent but to something like this: rgba(0,0,0,1)
    This almost has the same effect like transparency but it's not. Thus it's also treaded differently by the windowing system and may help you.

Log in to reply