![]() |
Qt 6.x
The Qt SDK
|
#include "qquicktextedit_p.h"
#include "qquicktextedit_p_p.h"
#include "qquicktextcontrol_p.h"
#include "qquicktextdocument_p.h"
#include "qquickevents_p_p.h"
#include "qquickwindow.h"
#include "qquicktextnode_p.h"
#include "qquicktextnodeengine_p.h"
#include <QtCore/qmath.h>
#include <QtGui/qguiapplication.h>
#include <QtGui/qevent.h>
#include <QtGui/qpainter.h>
#include <QtGui/qtextobject.h>
#include <QtGui/qtexttable.h>
#include <QtQml/qqmlinfo.h>
#include <QtQuick/qsgsimplerectnode.h>
#include <private/qqmlglobal_p.h>
#include <private/qqmlproperty_p.h>
#include <private/qtextengine_p.h>
#include <private/qsgadaptationlayer_p.h>
#include "qquicktextdocument.h"
#include <algorithm>
#include "moc_qquicktextedit_p.cpp"
Go to the source code of this file.
Macros | |
#define | QQUICKTEXT_LARGETEXT_THRESHOLD 10000 |
Typedefs | |
typedef QQuickTextEditPrivate::Node | TextNode |
using | TextNodeIterator = QQuickTextEditPrivate::TextNodeIterator |
Functions | |
static bool | operator< (const TextNode &n1, const TextNode &n2) |
static void | updateNodeTransform (QQuickTextNode *node, const QPointF &topLeft) |
void | resetEngine (QQuickTextNodeEngine *engine, const QColor &textColor, const QColor &selectedTextColor, const QColor &selectionColor) |
QDebug | operator<< (QDebug debug, const QQuickTextEditPrivate::Node &n) |
Variables | |
static QT_BEGIN_NAMESPACE const int | nodeBreakingSize = 300 |
\qmlsignal QtQuick::TextEdit::linkActivated(string link) | |
#define QQUICKTEXT_LARGETEXT_THRESHOLD 10000 |
Definition at line 98 of file qquicktextedit.cpp.
typedef QQuickTextEditPrivate::Node TextNode |
Definition at line 2059 of file qquicktextedit.cpp.
Definition at line 2060 of file qquicktextedit.cpp.
Definition at line 2062 of file qquicktextedit.cpp.
References QQuickTextEditPrivate::Node::startPos().
QDebug operator<< | ( | QDebug | debug, |
const QQuickTextEditPrivate::Node & | n | ||
) |
Definition at line 3381 of file qquicktextedit.cpp.
|
inline |
Definition at line 2093 of file qquicktextedit.cpp.
References engine.
Referenced by QQuickTextEdit::updatePaintNode().
|
inlinestatic |
Definition at line 2067 of file qquicktextedit.cpp.
References QSGTransformNode::setMatrix(), QMatrix4x4::translate(), QPointF::x(), and QPointF::y().
Referenced by QQuickTextEdit::updatePaintNode().
|
static |
\qmlsignal QtQuick::TextEdit::linkActivated(string link)
\qmltype TextEdit \instantiates QQuickTextEdit \inqmlmodule QtQuick \ingroup qtquick-visual \ingroup qtquick-input \inherits Item \brief Displays multiple lines of editable formatted text. The TextEdit item displays a block of editable, formatted text. It can display both plain and rich text. For example: \qml
TextEdit { width: 240 text: "<b>Hello</b> <i>World!</i>" font.family: "Helvetica" font.pointSize: 20 color: "blue" focus: true } \endqml
Setting \l {Item::focus}{focus} to true
enables the TextEdit item to receive keyboard focus.
Note that the TextEdit does not implement scrolling, following the cursor, or other behaviors specific to a look and feel. For example, to add flickable scrolling that follows the cursor:
A particular look and feel might use smooth scrolling (eg. using SmoothedAnimation), might have a visible scrollbar, or a scrollbar that fades in to show location, etc.
Clipboard support is provided by the cut(), copy(), and paste() functions. Text can be selected by mouse in the usual way, unless \l selectByMouse is set to false
; and by keyboard with the {Shift+arrow}
key combinations, unless \l selectByKeyboard is set to false
. To select text programmatically, you can set the \l selectionStart and \l selectionEnd properties, or use \l selectAll() or \l selectWord().
You can translate between cursor positions (characters from the start of the document) and pixel points using positionAt() and positionToRectangle().
This signal is emitted when the user clicks on a link embedded in the text. The link must be in rich text or HTML format and the link string provides access to the particular link.
Definition at line 95 of file qquicktextedit.cpp.
Referenced by QQuickTextEdit::updatePaintNode().