Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You have probably looked into <a href="http://doc.qt.nokia.com/4.7/stylesheet-examples.html#customizing-qtabwidget-and-qtabbar" rel="nofollow">Customizing QTabWidget and QTabBar</a>.</p> <p>To style individual tabs based on their state (:only-one, :first, :last, :middle, :previous-selected, :next-selected, :selected) you can use stylesheet-code similar to this:</p> <pre><code>QTabBar::tab { border: 1px solid #C4C4C3; border-bottom-color: #C2C7CB; border-top-left-radius: 4px; border-top-right-radius: 4px; padding: 1px 3px; margin-left: 1px; margin-bottom: 4px; } QTabBar::tab:selected { background-color: #f14040; border-bottom-style: none; } </code></pre> <p>As the individual tabs are not widgets (or objects), they have no object name or other properties that could identify them to a stylsheet. You can only use the pseudo-classes to style tabs with a stylesheet.</p> <p>You'll probably have to use (C++) code to change the style of a tab depending on the label. The recommended way for customizing styles in Qt is through the class <a href="http://doc.qt.nokia.com/4.7/qstyle.html#creating-a-custom-style" rel="nofollow"><code>QStyle</code></a>. You can either subclass <code>QStyle</code> or use <code>QProxyStyle</code> to change the looks of specific widgets. The other alternative (probably not recommended by Qt) is though subclassing QTabBar and reimplementing the function <a href="http://doc.qt.nokia.com/4.7/qwidget.html#paintEvent" rel="nofollow"><code>QWidget::paintEvent( QPaintEvent *event)</code></a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload