42 #include "private/qdeclarativetextinput_p.h" 43 #include "private/qdeclarativetextinput_p_p.h" 45 #include <private/qdeclarativeglobal_p.h> 49 #include <QTextCursor> 50 #include <QApplication> 51 #include <QFontMetrics> 53 #include <QTextBoundaryFinder> 54 #include <QInputContext> 57 #ifndef QT_NO_LINEEDIT 106 return d->control->text();
114 d->control->setText(s);
258 return d->sourceFont;
264 if (
d->sourceFont == font)
267 d->sourceFont =
font;
270 if (
d->font.pointSizeF() != -1) {
273 d->font.setPointSizeF(size/2.0);
276 if (oldFont !=
d->font) {
277 d->control->setFont(
d->font);
324 return d->selectionColor;
330 if (
d->selectionColor == color)
333 d->selectionColor =
color;
336 d->control->setPalette(p);
337 if (
d->control->hasSelectedText()) {
355 return d->selectedTextColor;
361 if (
d->selectedTextColor == color)
364 d->selectedTextColor =
color;
367 d->control->setPalette(p);
368 if (
d->control->hasSelectedText()) {
409 bool forceAlign =
d->hAlignImplicit &&
d->effectiveLayoutMirror;
410 d->hAlignImplicit =
false;
419 d->hAlignImplicit =
true;
429 if (!
d->hAlignImplicit &&
d->effectiveLayoutMirror) {
441 return effectiveAlignment;
449 emit q->horizontalAlignmentChanged(alignment);
457 if (hAlignImplicit) {
461 text = control->preeditAreaText();
473 if (q->isComponentComplete()) {
475 q->updateCursorRectangle();
476 updateHorizontalScroll();
497 return d->control->isReadOnly();
503 if (
d->control->isReadOnly() == ro)
507 d->control->setReadOnly(ro);
526 return d->control->maxLength();
532 if (
d->control->maxLength() == ml)
535 d->control->setMaxLength(ml);
572 return d->cursorVisible;
578 if (
d->cursorVisible == on)
580 d->cursorVisible = on;
582 QRect r =
d->control->cursorRect();
583 if (
d->control->inputMask().isEmpty())
600 return d->control->cursor();
605 if (cp < 0 || cp >
d->control->text().length())
607 d->control->moveCursor(cp);
617 QRect r =
d->control->cursorRect();
621 r.
adjust(5 -
d->hscroll, 0, -4 -
d->hscroll, -1);
641 return d->lastSelectionStart;
660 return d->lastSelectionEnd;
682 if (start < 0 || end < 0 || start >
d->control->text().length() || end >
d->control->text().length())
684 d->control->setSelection(start, end-start);
707 return d->control->selectedText();
722 return d->focusOnPress;
728 if (
d->focusOnPress == b)
748 return d->autoScroll;
754 if (
d->autoScroll == b)
897 #ifndef QT_NO_VALIDATOR 902 return const_cast<QValidator*
>(
d->control->validator());
908 if (
d->control->validator() == v)
911 d->control->setValidator(v);
912 if(!
d->control->hasAcceptableInput()){
913 d->oldValidity =
false;
919 #endif // QT_NO_VALIDATOR 936 return d->control->inputMask();
942 if (
d->control->inputMask() == im)
945 d->control->setInputMask(im);
963 return d->control->hasAcceptableInput();
982 uint echo = control->echoMode();
989 q->setInputMethodHints(hints);
1018 d->control->setEchoMode((
uint)echo);
1019 d->updateInputMethodHints();
1027 return d->inputMethodHints;
1033 if (
d->inputMethodHints == hints)
1035 d->inputMethodHints = hints;
1036 d->updateInputMethodHints();
1058 return d->cursorComponent;
1064 if (
d->cursorComponent == c)
1067 d->cursorComponent =
c;
1070 delete d->cursorItem;
1072 d->startCreatingCursor();
1081 if(cursorComponent->isReady()){
1083 }
else if(cursorComponent->isLoading()){
1084 q->connect(cursorComponent,
SIGNAL(statusChanged(
int)),
1094 if(
d->cursorComponent->isError()){
1095 qmlInfo(
this,
d->cursorComponent->errors()) <<
tr(
"Could not load cursor delegate");
1099 if(!
d->cursorComponent->isReady())
1103 delete d->cursorItem;
1106 qmlInfo(
this,
d->cursorComponent->errors()) <<
tr(
"Could not instantiate cursor delegate");
1111 d->cursorItem->setParentItem(
this);
1112 d->cursorItem->setX(
d->control->cursorToX());
1113 d->cursorItem->setHeight(
d->control->height()-1);
1131 if (pos >
d->control->cursorPosition())
1132 pos +=
d->control->preeditAreaText().length();
1133 return QRectF(
d->control->cursorToX(pos)-
d->hscroll,
1135 d->control->cursorWidth(),
1170 const int cursor =
d->control->cursor();
1172 const int preeditLength =
d->control->preeditAreaText().length();
1173 pos = pos > cursor + preeditLength
1174 ? pos - preeditLength
1185 if(!hasFocus && control->passwordEchoEditing())
1186 control->updatePasswordEchoEditing(
false);
1188 control->deselect();
1205 if (cursorPosition == 0)
1207 if (!ignore && cursorPosition ==
d->control->text().length())
1213 d->control->processKeyEvent(ev);
1223 const bool wasComposing =
d->control->preeditAreaText().length() > 0;
1226 if (
d->control->isReadOnly()) {
1229 d->control->processInputMethodEvent(ev);
1235 if (wasComposing != (
d->control->preeditAreaText().length() > 0))
1248 if (
d->selectByMouse) {
1250 d->control->selectWordAtPos(cursor);
1251 event->setAccepted(
true);
1262 if(
d->focusOnPress){
1265 if (
d->showInputPanelOnFocus) {
1272 d->clickCausedFocus =
true;
1276 if (
d->selectByMouse) {
1278 d->selectPressed =
true;
1279 d->pressPos =
event->pos();
1283 d->control->moveCursor(
cursor, mark);
1284 event->setAccepted(
true);
1292 if (
d->selectPressed) {
1296 event->setAccepted(
true);
1311 if (
d->selectPressed) {
1312 d->selectPressed =
false;
1315 if (!
d->showInputPanelOnFocus) {
1318 if (view->scene() && view->scene() ==
scene()) {
1324 d->clickCausedFocus =
false;
1325 d->control->processEvent(event);
1333 #if !defined QT_NO_IM 1338 if (!widget &&
qApp) {
1340 if (view && view->
scene() && view->
scene() == q->scene())
1344 if (widget && control->composeMode()) {
1345 int tmp_cursor = xToPos(event->
pos().
x());
1346 int mousePos = tmp_cursor - control->
cursor();
1347 if (mousePos < 0 || mousePos > control->preeditAreaText().length()) {
1362 event->modifiers());
1367 if (!control->preeditAreaText().isEmpty())
1383 d->selectPressed =
false;
1393 bool handled =
false;
1404 handled =
d->control->processEvent(ev);
1412 const QRectF &oldGeometry)
1414 if (newGeometry.
width() != oldGeometry.
width()) {
1423 return qRound(control->naturalTextWidth());
1429 const int preeditLength = control->preeditAreaText().length();
1430 int cix =
qRound(control->cursorToX(control->cursor() + preeditLength));
1431 QRect br(q->boundingRect().toRect());
1432 int widthUsed = calculateTextWidth();
1436 if (widthUsed <= br.width()) {
1440 hscroll = widthUsed - br.width() - 1;
1443 hscroll = (widthUsed - br.width()) / 2;
1450 }
else if (cix - hscroll >= br.width()) {
1452 hscroll = cix - br.width() + 1;
1453 }
else if (cix - hscroll < 0 && hscroll < widthUsed) {
1456 }
else if (widthUsed - hscroll < br.width()) {
1459 hscroll = widthUsed - br.width() + 1;
1461 if (preeditLength > 0) {
1464 cix =
qRound(control->cursorToX(
1465 control->cursor() +
qMax(0, control->preeditCursor() - 1)));
1470 switch (effectiveHAlign) {
1472 hscroll = q->width() - widthUsed;
1475 hscroll = (q->width() - widthUsed) / 2;
1492 if(!
isReadOnly() &&
d->cursorVisible && !
d->cursorItem)
1494 if (
d->control->hasSelectedText())
1499 if (
d->autoScroll) {
1503 offset =
QPoint(
d->hscroll, 0);
1505 d->control->draw(p, offset, r, flags);
1533 if (
d->control->selectionStart() ==
d->control->selectionEnd())
1535 else if (
d->control->selectionStart() ==
d->control->cursor())
1536 return QVariant(
d->control->selectionEnd());
1538 return QVariant(
d->control->selectionStart());
1556 d->control->deselect();
1570 d->control->setSelection(0,
d->control->text().length());
1586 qmlInfo(
this) <<
"isRightToLeft(start, end) called with the end property being smaller than the start.";
1589 return d->control->text().mid(start, end - start).isRightToLeft();
1593 #ifndef QT_NO_CLIPBOARD 1634 if(!
d->control->isReadOnly())
1635 d->control->paste();
1637 #endif // QT_NO_CLIPBOARD 1650 d->control->selectWordAtPos(
d->control->cursor());
1686 return QString(
d->control->passwordCharacter());
1694 d->control->setPasswordCharacter(str.
constData()[0]);
1718 return d->control->displayText();
1737 return d->selectByMouse;
1743 if (
d->selectByMouse != on) {
1744 d->selectByMouse = on;
1769 return d->mouseSelectionMode;
1775 if (
d->mouseSelectionMode != mode) {
1776 d->mouseSelectionMode = mode;
1800 d->control->moveCursor(position,
true);
1849 d->control->moveCursor(pos,
true);
1850 }
else if (pos !=
d->control->cursor()){
1851 const int cursor =
d->control->cursor();
1853 if (!
d->control->hasSelectedText())
1854 anchor =
d->control->cursor();
1855 else if (
d->control->selectionStart() ==
d->control->cursor())
1856 anchor =
d->control->selectionEnd();
1858 anchor =
d->control->selectionStart();
1860 if (anchor < pos || (anchor == pos && cursor < pos)) {
1865 const QTextBoundaryFinder::BoundaryReasons reasons = finder.
boundaryReasons();
1877 d->control->setSelection(anchor, cursor - anchor);
1878 }
else if (anchor > pos || (anchor == pos && cursor > pos)) {
1883 const QTextBoundaryFinder::BoundaryReasons reasons = finder.
boundaryReasons();
1895 d->control->setSelection(anchor, cursor - anchor);
1947 if (view->scene() && view->scene() ==
scene()) {
2002 if (view->scene() && view->scene() ==
scene()) {
2012 if (
d->showInputPanelOnFocus) {
2039 return d->control->preeditAreaText().length() > 0;
2045 control->setParent(q);
2046 control->setCursorWidth(1);
2062 #ifndef QT_NO_CLIPBOARD 2068 #endif // QT_NO_CLIPBOARD 2074 oldValidity = control->hasAcceptableInput();
2075 lastSelectionStart = 0;
2076 lastSelectionEnd = 0;
2080 determineHorizontalAlignment();
2088 d->control->resetCursorBlinkTimer();
2090 if(!
d->control->hasSelectedText()){
2091 if(
d->lastSelectionStart !=
d->control->cursor()){
2092 d->lastSelectionStart =
d->control->cursor();
2095 if(
d->lastSelectionEnd !=
d->control->cursor()){
2096 d->lastSelectionEnd =
d->control->cursor();
2105 d->determineHorizontalAlignment();
2106 d->updateHorizontalScroll();
2111 d->cursorItem->setX(
d->control->cursorToX() -
d->hscroll);
2120 if(
d->lastSelectionStart !=
d->control->selectionStart()){
2121 d->lastSelectionStart =
d->control->selectionStart();
2122 if(
d->lastSelectionStart == -1)
2123 d->lastSelectionStart =
d->control->cursor();
2126 if(
d->lastSelectionEnd !=
d->control->selectionEnd()){
2127 d->lastSelectionEnd =
d->control->selectionEnd();
2128 if(
d->lastSelectionEnd == -1)
2129 d->lastSelectionEnd =
d->control->cursor();
2140 d->determineHorizontalAlignment();
2141 d->updateHorizontalScroll();
2164 int cursorWidth =
d->cursorItem ?
d->cursorItem->width() :
d->control->cursorWidth();
2189 bool old =
d->canPaste;
2190 #ifndef QT_NO_CLIPBOARD 2193 if(
d->canPaste != old)
2199 #endif // QT_NO_LINEEDIT The QVariant class acts like a union for the most common Qt data types.
void setMaxLength(int ml)
The QPainter class performs low-level painting on widgets and other paint devices.
The QColor class provides colors based on RGB, HSV or CMYK values.
int selectionStart() const
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Q_INVOKABLE void closeSoftwareInputPanel()
QDeclarativeComponent * cursorDelegate() const
qreal right() const
Returns the x-coordinate of the rectangle's right edge.
The QKeyEvent class describes a key event.
QPoint screenPos() const
Returns the mouse cursor position in screen coordinates.
void cursorDelegateChanged()
bool sceneEvent(QEvent *event)
int cursorPosition() const
The QFontMetrics class provides font metrics information.
void cursorPositionChanged()
#define QT_END_NAMESPACE
This macro expands to.
QPointer< QWidget > widget
QDeclarativeParserStatus ** d
bool selectByMouse() const
void setFocusOnPress(bool)
bool isComponentComplete() const
Returns true if construction of the QML component is complete; otherwise returns false.
void maximumLengthChanged(int maximumLength)
virtual bool event(QEvent *)
void setContentsSize(const QSize &)
Sets the size of the contents to the given size.
int length() const
Returns the number of characters in this string.
void drawContents(QPainter *p, const QRect &r)
This function is called when the cache needs to be refreshed.
The QGraphicsSceneMouseEvent class provides mouse events in the graphics view framework.
void setColor(const QColor &c)
int toPreviousBoundary()
Moves the QTextBoundaryFinder to the previous boundary position and returns that position.
static qreal position(QGraphicsObject *item, QDeclarativeAnchorLine::AnchorLine anchorLine)
void restore()
Restores the current painter state (pops a saved state off the stack).
void setText(const QString &)
Qt::MouseButton button() const
Returns the mouse button (if any) that caused the event.
QRectF boundingRect() const
static bool ignore(const char *test, const char *const *table)
int width() const
Returns the width of the rectangle.
virtual void keyPressEvent(QKeyEvent *event)
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
QPointF pos() const
Returns the position of the item in parent coordinates.
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
This event handler, for event event, can be reimplemented to receive mouse doubleclick events for thi...
void mousePressEvent(QGraphicsSceneMouseEvent *event)
This event handler, for event event, can be reimplemented to receive mouse press events for this item...
void passwordCharacterChanged()
static int cursorFlashTime()
void updateMicroFocus()
Updates the item's micro focus.
int height() const
Returns the height of the rectangle.
The QString class provides a Unicode character string.
T * qobject_cast(QObject *object)
QString passwordCharacter() const
void update(const QRectF &rect=QRectF())
Schedules a redraw of the area covered by rect in this item.
Q_DECL_CONSTEXPR T qAbs(const T &t)
const QColor & color(ColorGroup cg, ColorRole cr) const
Returns the color in the specified color group, used for the given color role.
The QPen class defines how a QPainter should draw lines and outlines of shapes.
bool isCursorVisible() const
int position() const
Returns the current position of the QTextBoundaryFinder.
QValidator * validator() const
void updateCursorRectangle()
void setRight(qreal pos)
Sets the right edge of the rectangle to the given x coordinate.
Q_INVOKABLE int positionAt(int x) const
void save()
Saves the current painter state (pushes the state onto a stack).
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
qreal x() const
Returns the x-coordinate of this point.
void selectedTextColorChanged(const QColor &color)
virtual void focusInEvent(QFocusEvent *event)
This event handler, for event event, can be reimplemented to receive focus in events for this item...
void keyPressEvent(QKeyEvent *ev)
int ascent() const
Returns the ascent of the font.
QCursor cursor() const
Returns the current cursor shape for the item.
Qt::KeyboardModifiers modifiers() const
Returns the keyboard modifier flags that existed immediately after the event occurred.
int key() const
Returns the code of the key that was pressed or released.
void setCursorVisible(bool on)
QRect cursorRectangle() const
void updateHorizontalScroll()
void setRenderHint(RenderHint hint, bool on=true)
Sets the given render hint on the painter if on is true; otherwise clears the render hint...
virtual void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
This function is called to handle this item's changes in geometry from oldGeometry to newGeometry...
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QValidator class provides validation of input text.
The QRectF class defines a rectangle in the plane using floating point precision. ...
BoundaryReasons boundaryReasons() const
Returns the reasons for the boundary finder to have chosen the current position as a boundary...
void setValidator(QValidator *v)
The QDeclarativeComponent class encapsulates a QML component definition.
void inputMethodComposingChanged()
void fontChanged(const QFont &font)
The QDeclarativeItem class provides the most basic of all visual items in QML.
static QClipboard * clipboard()
Returns a pointer to the application global clipboard.
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
This event handler, for event event, can be reimplemented to receive mouse move events for this item...
void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
This event handler, for event event, can be reimplemented to receive mouse move events for this item...
void setPasswordCharacter(const QString &str)
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
void readOnlyChanged(bool isReadOnly)
void echoModeChanged(EchoMode echoMode)
void inputMaskChanged(const QString &inputMask)
void selectionColorChanged(const QColor &color)
bool isRightToLeft() const
Returns true if the string is read right to left.
void selectByMouseChanged(bool selectByMouse)
void acceptableInputChanged()
void adjust(int x1, int y1, int x2, int y2)
Adds dx1, dy1, dx2 and dy2 respectively to the existing coordinates of the rectangle.
HAlignment hAlign() const
bool hasActiveFocus() const
void updateSize(bool needsRedraw=true)
void inputMethodPreHandler(QInputMethodEvent *)
void setPosition(int position)
Sets the current position of the QTextBoundaryFinder to position.
void setCursorPosition(int cp)
bool focusOnPress() const
void focusInEvent(QFocusEvent *event)
This event handler, for event event, can be reimplemented to receive focus in events for this item...
qreal width() const
Returns the width of the rectangle.
void cursorRectangleChanged()
static bool sendEvent(QObject *receiver, QEvent *event)
Sends event event directly to receiver receiver, using the notify() function.
void select(int start, int end)
void setHAlign(HAlignment align)
Qt::InputMethodHints inputMethodHints() const
Returns the current input method hints of this item.
void dirtyCache(const QRect &)
Marks areas of the cache that intersect with the given rect as dirty and in need of being refreshed...
static int startDragDistance()
virtual void mouseHandler(int x, QMouseEvent *event)
This function can be reimplemented in a subclass to handle mouse press, release, double-click, and move events within the preedit text.
GraphicsItemFlags flags() const
Returns this item's flags.
void colorChanged(const QColor &color)
void setImplicitWidth(qreal)
Sets the implied width of the item to w.
void setIMHints(Qt::InputMethodHints hints)
void cursorVisibleChanged(bool isCursorVisible)
Qt::InputMethodHints imHints() const
HAlignment effectiveHAlign() const
SelectionMode mouseSelectionMode() const
void setSelectionColor(const QColor &c)
void mouseSelectionModeChanged(SelectionMode mode)
QDeclarativeTextInput(QDeclarativeItem *parent=0)
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void focusChanged(bool hasFocus)
The QMouseEvent class contains parameters that describe a mouse event.
void displayTextChanged()
virtual void focusChanged(bool)
void selectionStartChanged()
QString inputMask() const
void updateRect(const QRect &r=QRect())
virtual void inputMethodEvent(QInputMethodEvent *)
Type
This enum type defines the valid event types in Qt.
QRectF boundingRect() const
void setInputMask(const QString &im)
The QFont class specifies a font used for drawing text.
int y() const
Returns the y-coordinate of the rectangle's top edge.
bool hasFocus() const
Returns true if the scene has focus; otherwise returns false.
void QDeclarative_setParent_noEvent(QObject *object, QObject *parent)
Makes the object a child of parent.
QString displayText() const
int x() const
Returns the x-coordinate of the rectangle's left edge.
void setCursorDelegate(QDeclarativeComponent *)
qreal x() const
This convenience function is equivalent to calling pos().
The QPoint class defines a point in the plane using integer precision.
int toNextBoundary()
Moves the QTextBoundaryFinder to the next boundary position and returns that position.
void setColor(ColorGroup cg, ColorRole cr, const QColor &color)
Sets the color in the specified color group, used for the given color role, to the specified solid co...
void setPen(const QColor &color)
Sets the painter's pen to have style Qt::SolidLine, width 0 and the specified color.
void selectedTextChanged()
The QRect class defines a rectangle in the plane using integer precision.
void updateInputMethodHints()
This handler is called when the Return or Enter key is pressed.
QVariant inputMethodQuery(Qt::InputMethodQuery property) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
virtual bool contains(const QPointF &point) const
Returns true if this item contains point, which is in local coordinates; otherwise, false is returned.
static void mouseEvent(MouseAction action, QWidget *widget, Qt::MouseButton button, Qt::KeyboardModifiers stateKey, QPoint pos, int delay=-1)
virtual bool sceneEvent(QEvent *)
QVariant property(const char *name) const
Returns the value of the object's name property.
The QGraphicsView class provides a widget for displaying the contents of a QGraphicsScene.
void clearCache()
Marks the entirety of the contents cache as dirty.
QPointF pos() const
Returns the mouse cursor position in item coordinates.
void ignore()
Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false).
void setFont(const QFont &font)
The QSize class defines the size of a two-dimensional object using integer point precision.
QGraphicsScene * scene() const
Returns the current scene for the item, or 0 if the item is not stored in a scene.
Q_INVOKABLE void moveCursorSelection(int pos)
bool setHAlign(QDeclarativeTextInput::HAlignment, bool forceAlign=false)
Q_INVOKABLE void openSoftwareInputPanel()
void setEchoMode(EchoMode echo)
bool sendMouseEventToInputContext(QGraphicsSceneMouseEvent *event, QEvent::Type eventType)
The QInputContext class abstracts the input method dependent data and composing state.
QString selectedText() const
QDeclarativeInfo qmlInfo(const QObject *me)
static Qt::LayoutDirection keyboardInputDirection()
Returns the current keyboard input direction.
int height() const
Returns the height of the font.
void setImplicitHeight(qreal)
Sets the implied height of the item to h.
void inputMethodEvent(QInputMethodEvent *)
void autoScrollChanged(bool autoScroll)
void setMouseSelectionMode(SelectionMode mode)
bool hasAcceptableInput() const
static const KeyPair *const end
void selectionEndChanged()
void setSelectByMouse(bool)
void setFlag(GraphicsItemFlag flag, bool enabled=true)
If enabled is true, the item flag flag is enabled; otherwise, it is disabled.
The QEvent class is the base class of all event classes.
Type type() const
Returns the event type.
QGraphicsScene * scene() const
Returns a pointer to the scene that is currently visualized in the view.
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
bool isInputMethodComposing() const
virtual void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
This function is called to handle this item's changes in geometry from oldGeometry to newGeometry...
The QTextBoundaryFinder class provides a way of finding Unicode text boundaries in a string...
Q_INVOKABLE void forceActiveFocus()
Forces active focus on the item.
QString text(Mode mode=Clipboard) const
Returns the clipboard text as plain text, or an empty string if the clipboard does not contain any te...
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
bool isRightToLeft(int start, int end)
void setSelectedTextColor(const QColor &c)
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
This event handler, for event event, can be reimplemented to receive mouse release events for this it...
const QChar * constData() const
Returns a pointer to the data stored in the QString.
The QFocusEvent class contains event parameters for widget focus events.
Q_DECL_CONSTEXPR int qRound(qreal d)
bool determineHorizontalAlignment()
void setKeepMouseGrab(bool)
The flag indicating whether the mouse should remain with this item is set to keep.
void activeFocusOnPressChanged(bool activeFocusOnPress)
void keyPressPreHandler(QKeyEvent *)
void startCreatingCursor()
QPoint topLeft() const
Returns the position of the rectangle's top-left corner.
QColor selectedTextColor() const
Q_INVOKABLE QRectF positionToRectangle(int pos) const
EchoMode echoMode() const
The QPalette class contains color groups for each widget state.
QColor selectionColor() const