Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for WebAssembly
  4. Toolbar background
Qt 6.11 is out! See what's new in the release blog

Toolbar background

Scheduled Pinned Locked Moved Unsolved Qt for WebAssembly
1 Posts 1 Posters 508 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    waslap
    wrote on last edited by
    #1

    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 ?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved