46 Q_PROPERTY(
QColor selectionColor READ selectionColor WRITE setSelectionColor NOTIFY selectionColorChanged)
47 Q_PROPERTY(
QColor selectedTextColor READ selectedTextColor WRITE setSelectedTextColor NOTIFY selectedTextColorChanged)
49 Q_PROPERTY(
HAlignment horizontalAlignment READ hAlign WRITE setHAlign RESET resetHAlign NOTIFY horizontalAlignmentChanged)
50 Q_PROPERTY(
HAlignment effectiveHorizontalAlignment READ effectiveHAlign NOTIFY effectiveHorizontalAlignmentChanged)
53 Q_PROPERTY(
int lineCount READ lineCount NOTIFY lineCountChanged)
60 Q_PROPERTY(
bool readOnly READ isReadOnly WRITE setReadOnly NOTIFY readOnlyChanged)
61 Q_PROPERTY(
bool cursorVisible READ isCursorVisible WRITE setCursorVisible NOTIFY cursorVisibleChanged)
62 Q_PROPERTY(
int cursorPosition READ cursorPosition WRITE setCursorPosition NOTIFY cursorPositionChanged)
65 Q_PROPERTY(
bool overwriteMode READ overwriteMode WRITE setOverwriteMode NOTIFY overwriteModeChanged)
66 Q_PROPERTY(
int selectionStart READ selectionStart NOTIFY selectionStartChanged)
67 Q_PROPERTY(
int selectionEnd READ selectionEnd NOTIFY selectionEndChanged)
69 Q_PROPERTY(
bool activeFocusOnPress READ focusOnPress WRITE setFocusOnPress NOTIFY activeFocusOnPressChanged)
70 Q_PROPERTY(
bool persistentSelection READ persistentSelection WRITE setPersistentSelection NOTIFY persistentSelectionChanged)
71 Q_PROPERTY(
qreal textMargin READ textMargin WRITE setTextMargin NOTIFY textMarginChanged)
72 Q_PROPERTY(
Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints NOTIFY inputMethodHintsChanged)
73 Q_PROPERTY(
bool selectByKeyboard READ selectByKeyboard WRITE setSelectByKeyboard NOTIFY selectByKeyboardChanged REVISION(2, 1))
74 Q_PROPERTY(
bool selectByMouse READ selectByMouse WRITE setSelectByMouse NOTIFY selectByMouseChanged)
75 Q_PROPERTY(
SelectionMode mouseSelectionMode READ mouseSelectionMode WRITE setMouseSelectionMode NOTIFY mouseSelectionModeChanged)
76 Q_PROPERTY(
bool canPaste READ canPaste NOTIFY canPasteChanged)
77 Q_PROPERTY(
bool canUndo READ canUndo NOTIFY canUndoChanged)
78 Q_PROPERTY(
bool canRedo READ canRedo NOTIFY canRedoChanged)
79 Q_PROPERTY(
bool inputMethodComposing READ isInputMethodComposing NOTIFY inputMethodComposingChanged)
84 Q_PROPERTY(
qreal padding READ padding WRITE setPadding RESET resetPadding NOTIFY paddingChanged REVISION(2, 6))
85 Q_PROPERTY(
qreal topPadding READ topPadding WRITE setTopPadding RESET resetTopPadding NOTIFY topPaddingChanged REVISION(2, 6))
86 Q_PROPERTY(
qreal leftPadding READ leftPadding WRITE setLeftPadding RESET resetLeftPadding NOTIFY leftPaddingChanged REVISION(2, 6))
87 Q_PROPERTY(
qreal rightPadding READ rightPadding WRITE setRightPadding RESET resetRightPadding NOTIFY rightPaddingChanged REVISION(2, 6))
88 Q_PROPERTY(
qreal bottomPadding READ bottomPadding WRITE setBottomPadding RESET resetBottomPadding NOTIFY bottomPaddingChanged REVISION(2, 6))
90 Q_PROPERTY(
qreal tabStopDistance READ tabStopDistance WRITE setTabStopDistance NOTIFY tabStopDistanceChanged REVISION(2, 10))
93#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
158 QColor selectionColor() const;
159 void setSelectionColor(const
QColor &
c);
161 QColor selectedTextColor() const;
162 void setSelectedTextColor(const
QColor &
c);
175 int lineCount() const;
179 bool isCursorVisible() const;
180 void setCursorVisible(
bool on);
182 int cursorPosition() const;
183 void setCursorPosition(
int pos);
188 bool overwriteMode() const;
189 void setOverwriteMode(
bool overwrite);
191 int selectionStart() const;
192 int selectionEnd() const;
196 bool focusOnPress() const;
197 void setFocusOnPress(
bool on);
199 bool persistentSelection() const;
200 void setPersistentSelection(
bool on);
202 qreal textMargin() const;
203 void setTextMargin(
qreal margin);
205 Qt::InputMethodHints inputMethodHints() const;
206 void setInputMethodHints(
Qt::InputMethodHints hints);
208 bool selectByKeyboard() const;
209 void setSelectByKeyboard(
bool);
211 bool selectByMouse() const;
212 void setSelectByMouse(
bool);
217 bool canPaste() const;
219 bool canUndo() const;
220 bool canRedo() const;
222 void componentComplete() override;
224 int resourcesLoading() const;
227 void setReadOnly(
bool);
228 bool isReadOnly() const;
230 QRectF cursorRectangle() const;
237 qreal contentWidth()
const;
238 qreal contentHeight()
const;
241 void setBaseUrl(
const QUrl &
url);
252 QRectF clipRect()
const override;
254 bool isInputMethodComposing()
const;
268 qreal padding() const;
269 void setPadding(
qreal padding);
272 qreal topPadding() const;
273 void setTopPadding(
qreal padding);
274 void resetTopPadding();
276 qreal leftPadding() const;
277 void setLeftPadding(
qreal padding);
278 void resetLeftPadding();
280 qreal rightPadding() const;
281 void setRightPadding(
qreal padding);
282 void resetRightPadding();
284 qreal bottomPadding() const;
285 void setBottomPadding(
qreal padding);
286 void resetBottomPadding();
288 int tabStopDistance() const;
291 void invalidate() override;
296 void contentSizeChanged();
297 void cursorPositionChanged();
298 void cursorRectangleChanged();
299 void selectionStartChanged();
300 void selectionEndChanged();
301 void selectedTextChanged();
308 void wrapModeChanged();
309 void lineCountChanged();
311 void readOnlyChanged(
bool isReadOnly);
312 void cursorVisibleChanged(
bool isCursorVisible);
313 void cursorDelegateChanged();
314 void overwriteModeChanged(
bool overwriteMode);
315 void activeFocusOnPressChanged(
bool activeFocusOnPressed);
316 void persistentSelectionChanged(
bool isPersistentSelection);
317 void textMarginChanged(
qreal textMargin);
318 Q_REVISION(2, 1)
void selectByKeyboardChanged(
bool selectByKeyboard);
319 void selectByMouseChanged(
bool selectByMouse);
323 void canPasteChanged();
324 void canUndoChanged();
325 void canRedoChanged();
326 void inputMethodComposingChanged();
327 void effectiveHorizontalAlignmentChanged();
328 void baseUrlChanged();
329 void inputMethodHintsChanged();
330 void renderTypeChanged();
344 bool isRightToLeft(
int start,
int end);
345#if QT_CONFIG(clipboard)
359 void q_textChanged();
360 void q_contentsChange(
int,
int,
int);
361 void updateSelection();
362 void moveCursorDelegate();
364 void q_canPasteChanged();
365 void updateWholeDocument();
366 void invalidateBlock(const
QTextBlock &block);
368 void q_linkHovered(const
QString &link);
369 void q_markerHovered(
bool hovered);
370 void q_updateAlignment();
372 void triggerPreprocess();
374 void resourceRequestFinished();
377 void markDirtyNodesForRange(
int start,
int end,
int charDelta);
378 void updateTotalLines();
379 void invalidateFontCaches();
385#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
386 void setOldSelectionDefault();
389 void geometryChange(
const QRectF &newGeometry,
const QRectF &oldGeometry)
override;
393 void keyPressEvent(
QKeyEvent *)
override;
394 void keyReleaseEvent(
QKeyEvent *)
override;
411 void updatePolish()
override;
\qmltype TextDocument \instantiates QQuickTextDocument \inqmlmodule QtQuick
Q_REVISION(2, 2) void append(const QString &text)
Q_REVISION(2, 7) QString preeditText() const
QQuickTextDocument * textDocument()
\reentrant \inmodule QtGui
static void getText(QString &text, QTextDocumentPrivate *priv, const QString &docText, int pos, int end)