summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-01-03 14:24:19 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:48:07 -0300
commit1ed2877743ce786e1d71f804f1b4aa4f433aa4be (patch)
treeddd3224dbcf0606f2bd638be88835c050952c1a3
parent1af0e9f4fe50537d18c07cfa05578d3242ce21c9 (diff)
Fix bug#577 - "Reference to QString in docs"
-rw-r--r--doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp b/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp
index 8086919d..b7f91e0b 100644
--- a/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp
+++ b/doc/codesnippets/doc/src/snippets/code/src_gui_itemviews_qstandarditemmodel.cpp
@@ -2,7 +2,7 @@
model = QStandardItemModel (4, 4)
for row in range(4):
for column in range(4):
- item = QStandardItem(QString("row %0, column %1").arg(row).arg(column))
+ item = QStandardItem("row %d, column %d" % (row, column))
model.setItem(row, column, item)
//! [0]
@@ -11,7 +11,7 @@ for row in range(4):
model = QStandardItemModel()
parentItem = model.invisibleRootItem()
for i in range(4):
- item = QStandardItem(QString("item %0").arg(i))
+ item = QStandardItem("item %d" % i)
parentItem.appendRow(item)
parentItem = item
//! [1]
@@ -20,8 +20,7 @@ for i in range(4):
//! [2]
treeView = QTreeView(self)
treeView.setModel(myStandardItemModel)
-connect(treeView, SIGNAL('clicked(QModelIndex)')
- this, SLOT('clicked(QModelIndex)'))
+treeView.clicked[QModelIndex].connect(self.clicked)
//! [2]