Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Toolbar background



  • The following code works under C++/X11 but not Emscripten/Firefox

       QPalette tp = toolBar->palette();
       tp.setBrush(QPalette::Background, QBrush(QPixmap(":/images/toolbar.png")));
       toolBar->setBackgroundRole(QPalette::Background);
       toolBar->setAutoFillBackground(true);
       toolBar->setPalette(tp);
    

    My intention is to set the toolbar's bacground image to something stylistic instead of flat grey default. It however comes out black in the browser whereas a desktop app sets it fine. Is there another way i can try this ?


Log in to reply