summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/code
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-09-12 22:02:57 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-09-12 22:02:57 (GMT)
commit8ed55cb6f105b6b147ab82be6b8ce80e86abc0a0 (patch)
treee17d0fa8f468a54b9d7f115200875e3e437c09d4 /doc/src/snippets/code
parent5f885e684a59944549fff563c3e4dd7c50a668b4 (diff)
parentf129de853154dc1d72cb5651606ca009c3b1f814 (diff)
downloadQt-8ed55cb6f105b6b147ab82be6b8ce80e86abc0a0.zip
Qt-8ed55cb6f105b6b147ab82be6b8ce80e86abc0a0.tar.gz
Qt-8ed55cb6f105b6b147ab82be6b8ce80e86abc0a0.tar.bz2
Merge branch '4.6'
Diffstat (limited to 'doc/src/snippets/code')
-rw-r--r--doc/src/snippets/code/doc_src_stylesheet.qdoc5
-rw-r--r--doc/src/snippets/code/src_gui_painting_qpainter.cpp17
2 files changed, 22 insertions, 0 deletions
diff --git a/doc/src/snippets/code/doc_src_stylesheet.qdoc b/doc/src/snippets/code/doc_src_stylesheet.qdoc
index f79f7ff..1c0440c 100644
--- a/doc/src/snippets/code/doc_src_stylesheet.qdoc
+++ b/doc/src/snippets/code/doc_src_stylesheet.qdoc
@@ -1007,6 +1007,11 @@ QHeaderView::section {
border: 1px solid #6c6c6c;
}
+QHeaderView::section:checked
+{
+ background-color: red;
+}
+
/* style the sort indicator */
QHeaderView::down-arrow {
image: url(down_arrow.png);
diff --git a/doc/src/snippets/code/src_gui_painting_qpainter.cpp b/doc/src/snippets/code/src_gui_painting_qpainter.cpp
index 8dfda66..0226161 100644
--- a/doc/src/snippets/code/src_gui_painting_qpainter.cpp
+++ b/doc/src/snippets/code/src_gui_painting_qpainter.cpp
@@ -241,3 +241,20 @@ QImage image(":/images/myImage.png");
QPainter painter(this);
painter.drawImage(target, image, source);
//! [20]
+
+
+//! [21]
+QPainter painter(this);
+painter.fillRect(0, 0, 128, 128, Qt::green);
+painter.beginNativePainting();
+
+glEnable(GL_SCISSOR_TEST);
+glScissor(0, 0, 64, 64);
+
+glClearColor(1, 0, 0, 1);
+glClear(GL_COLOR_BUFFER_BIT);
+
+glDisable(GL_SCISSOR_TEST);
+
+painter.endNativePainting();
+//! [21]