Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
src_gui_text_qtextcursor.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3#include <QImage>
4#include <QTextCursor>
5#include <QTextDocument>
6
9
10void wrapper0() {
12
13
15cursor.clearSelection();
17cursor.insertText("Hello World");
19
20
24cursor.insertImage("myimage");
26
27} // wrapper0
28
29
30void wrapper1() {
33cursor.beginEditBlock();
34cursor.insertText("Hello");
35cursor.insertText("World");
36cursor.endEditBlock();
37
40} // wrapper1
41
42
43void wrapper2() {
46cursor.beginEditBlock();
47cursor.insertText("Hello");
48cursor.insertText("World");
49cursor.endEditBlock();
50
51// ...
52
53cursor.joinPreviousEditBlock();
54cursor.insertText("Hey");
55cursor.endEditBlock();
56
59} // wrapper2
60
61} // src_gui_text_qtextcursor
\inmodule QtGui
Definition qimage.h:37
\reentrant \inmodule QtGui
Definition qtextcursor.h:30
\reentrant \inmodule QtGui
void undo(QTextCursor *cursor)
void addResource(int type, const QUrl &name, const QVariant &resource)
Adds the resource resource to the resource cache, using type and name as identifiers.
\inmodule QtCore
Definition qurl.h:94
QCursor cursor
GLint void * img
Definition qopenglext.h:233