⚠️ Forum Maintenance: Feb 6th, 8am - 14pm (UTC+2)

[SOLVED]How to styling child-controls

  • Hi,

    I'm using stylesheet for styling child-controls of QDialog but the following snippets makes the QDialog itself transparent while I want to make all the child-controls transparent and the QDialog itself with red background!!!

    How can I fix this issue?

    @QDialog {
    background-color: red;

    QDialog > QWidget {
    background-color: rgba(255, 255, 255, 0);

  • Lifetime Qt Champion


    Just tested with a dummy dialog containing a QPushButton and it's working. What version of Qt on what OS are you using ?

  • [quote]What version of Qt on what OS are you using ?[/quote]

    Oops; I was using very old version of Qt

    Sorry for disturbing :)

Log in to reply