aboutsummaryrefslogtreecommitdiffstats
path: root/doc/example
diff options
context:
space:
mode:
authorhjk <[email protected]>2009-03-24 17:57:43 +0100
committerhjk <[email protected]>2009-03-24 17:57:43 +0100
commit6aeb8a764bbc17f57e3dec14187857697fc64ee2 (patch)
tree2752a18d53276aae12b786b0b07da19e135011bf /doc/example
parenta4bb415f58fdcc5d2bbacc4a430e68e56423726d (diff)
more fixes to the textfinder example documentation
Diffstat (limited to 'doc/example')
-rw-r--r--doc/example/textfinder/textfinder.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/example/textfinder/textfinder.cpp b/doc/example/textfinder/textfinder.cpp
index 28cfc597b62..c302f91911f 100644
--- a/doc/example/textfinder/textfinder.cpp
+++ b/doc/example/textfinder/textfinder.cpp
@@ -33,18 +33,21 @@
#include <QtCore/QTextStream>
#include <QtGui/QMessageBox>
+//! [2]
TextFinder::TextFinder(QWidget *parent)
: QWidget(parent), ui(new Ui::TextFinder)
{
ui->setupUi(this);
loadTextFile();
}
+//! [2]
TextFinder::~TextFinder()
{
delete ui;
}
+//! [0]
void TextFinder::loadTextFile()
{
QFile inputFile(":/input.txt");
@@ -58,9 +61,12 @@ void TextFinder::loadTextFile()
QTextCursor cursor = ui->textEdit->textCursor();
cursor.movePosition(QTextCursor::Start, QTextCursor::MoveAnchor, 1);
}
+//! [0]
+//! [1]
void TextFinder::on_findButton_clicked()
{
QString searchString = ui->lineEdit->text();
ui->textEdit->find(searchString, QTextDocument::FindWholeWords);
}
+//! [1]