From 4ccca8327e6ab968541a9f42df7d72e66ddc7746 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Fri, 28 Aug 2009 13:57:51 +0200 Subject: Document the fact that you can change QTabBar close button with stylesheet --- doc/src/snippets/code/doc_src_stylesheet.qdoc | 11 +++++++++++ doc/src/widgets-and-layouts/stylesheet.qdoc | 10 +++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/doc/src/snippets/code/doc_src_stylesheet.qdoc b/doc/src/snippets/code/doc_src_stylesheet.qdoc index 4046d85..1b9c509 100644 --- a/doc/src/snippets/code/doc_src_stylesheet.qdoc +++ b/doc/src/snippets/code/doc_src_stylesheet.qdoc @@ -1955,3 +1955,14 @@ QTreeView::branch:open:has-children:has-siblings { image: url(branch-open.png); } //! [158] + +//! [159] +QTabBar::close-button { + image: url(close.png) + subcontrol-position: left; +} +QTabBar::close-button:hover { + image: url(close-hover.png) +} + +//! [159] diff --git a/doc/src/widgets-and-layouts/stylesheet.qdoc b/doc/src/widgets-and-layouts/stylesheet.qdoc index 5fd57a5..24f3171 100644 --- a/doc/src/widgets-and-layouts/stylesheet.qdoc +++ b/doc/src/widgets-and-layouts/stylesheet.qdoc @@ -1118,8 +1118,9 @@ \row \o QTabBar \target qtabbar-widget - \o Individual tabs may be styled using the \l{#tab-sub}{::tab} - subcontrol. The tabs support the + \o Individual tabs may be styled using the \l{#tab-sub}{::tab} subcontrol. + Close buttons using the \l{#close-button-sub}{::close-button} + The tabs support the \l{#only-one-ps}{:only-one}, \l{#first-ps}{:first}, \l{#last-ps}{:last}, \l{#middle-ps}{:middle}, \l{#previous-selected-ps}{:previous--selected}, @@ -3217,7 +3218,7 @@ \row \o \c ::close-button \target close-button-sub - \o The close button of a QDockWidget. + \o The close button of a QDockWidget or tabs of QTabBar \row \o \c ::corner \target corner-sub @@ -3803,6 +3804,9 @@ The tear indicator and the scroll buttons can be further customized as follows: \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 148 + Sine Qt 4.6 the close button can be customized as follow: + \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 159 + \section2 Customizing QTableView Suppose we'd like our selected item in QTableView to have bubblegum pink -- cgit v0.12