Hi all,

I am trying to customize tabs on a tabWidget. I make so far

Qt Code:
  1. QString styleTabs;
  2. styleTabs.append("QTabBar::tab { width:120px; height:30px; color:#333399; font-family:Tahoma; font-size:14px; font-weight:bold; }");
  3. styleTabs.append("QTabBar::tab:hover { border-top:2px solid #E68B2C; margin-top:-1px; }");
  4. ui->tabWidget->setStyleSheet(styleTabs);
To copy to clipboard, switch view to plain text mode 

The problem is when I hover the properties are lost. I.e. my selected tab is white. When I hover it the background:white property is lost and the tab become gray. I want to inherit the properties somehow. How can I do that?

The other thing I want to do is to change the background color of all tabs that are not active. How can I match them?

And the third thing is to put background image on some element. I try

Qt Code:
  1. QString styleButton2;
  2. styleButton2.append("QPushButton { background-image:url('icon.png'); background-repeat:none; background-position:top left; }");
  3. ui->pushButton_2->setStyleSheet(styleButton2);
To copy to clipboard, switch view to plain text mode 

The image is in the same folder as the project, header and c++ files.