diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2014-01-28 14:55:31 +0200 |
---|---|---|
committer | Tomi Korpipää <tomi.korpipaa@digia.com> | 2014-01-29 06:14:24 +0200 |
commit | 01e42c90075fcfc5a9275d5161df476797625375 (patch) | |
tree | f15581a7369a865074fb497ee40c0b27badc4e76 /examples/itemmodel/main.cpp | |
parent | 33e9f279770d79a9c0b57201b3e45e4061e39aaa (diff) |
Minor tweaks to examples
Change-Id: Ic7ab56bc4829fafb0b1c3352bd3cdd4c3530291d
Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'examples/itemmodel/main.cpp')
-rw-r--r-- | examples/itemmodel/main.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/itemmodel/main.cpp b/examples/itemmodel/main.cpp index b6b67f85..2fce72aa 100644 --- a/examples/itemmodel/main.cpp +++ b/examples/itemmodel/main.cpp @@ -80,8 +80,8 @@ GraphDataGenerator::GraphDataGenerator(Q3DBars *bargraph, QTableWidget *tableWid // and add a small space between them m_graph->setBarThickness(1.0f); m_graph->setBarSpacing(QSizeF(0.2, 0.2)); - //! [5] + //! [5] #ifndef USE_STATIC_DATA // Set up sample space; make it as deep as it's wide m_graph->rowAxis()->setRange(0, m_rowCount); @@ -98,7 +98,6 @@ GraphDataGenerator::GraphDataGenerator(Q3DBars *bargraph, QTableWidget *tableWid m_graph->seriesList().at(0)->setItemLabelFormat(QStringLiteral("@valueLabel")); #else //! [6] - // Set selection mode to slice row m_graph->setSelectionMode(QAbstract3DGraph::SelectionItemAndRow | QAbstract3DGraph::SelectionSlice); @@ -106,7 +105,6 @@ GraphDataGenerator::GraphDataGenerator(Q3DBars *bargraph, QTableWidget *tableWid #endif //! [7] - // Set theme m_graph->activeTheme()->setType(Q3DTheme::ThemeDigia); @@ -138,6 +136,7 @@ void GraphDataGenerator::start() #else //! [8] setupModel(); + // Table needs to be shown before the size of its headers can be accurately obtained, // so we postpone it a bit m_dataTimer = new QTimer(); |