12#if QT_CONFIG(draganddrop)
32#if QT_CONFIG(textedit)
34#include <private/qtextedit_p.h>
36#include <private/qwidgettextcontrol_p.h>
38#if QT_CONFIG(accessibility)
41#if QT_CONFIG(itemviews)
44#include "private/qstylesheetstyle_p.h"
46#if QT_CONFIG(shortcut)
47#include "private/qapplication_p.h"
48#include "private/qshortcutmap_p.h"
50#define ACCEL_KEY(k) (!QCoreApplication::testAttribute(Qt::AA_DontShowShortcutsInContextMenus) \
51 && !QGuiApplicationPrivate::instance()->shortcutMap.hasShortcutForKeySequence(k) ? \
52 u'\t' + QKeySequence(k).toString(QKeySequence::NativeText) : QString())
54#define ACCEL_KEY(k) QString()
85 if (
d->control->isReadOnly())
87#ifdef QT_KEYPAD_NAVIGATION
89 option->state |= QStyle::State_HasEditFocus;
288 return d->control->text();
318 return d->placeholderText;
326 if (
d->shouldShowPlaceholderText())
348 return d->control->displayText();
373 return d->control->maxLength();
455static const char clearButtonActionNameC[] = "_q_qlineeditclearaction";
470 widgetAction->setVisible(!
text().isEmpty());
474 d->removeAction(clearAction);
543 return (
EchoMode)
d->control->echoMode();
557 d->control->setEchoMode(
mode);
562#ifndef QT_NO_VALIDATOR
573 return d->control->validator();
599 d->control->setValidator(
v);
603#if QT_CONFIG(completer)
622 if (
c ==
d->control->completer())
624 if (
d->control->completer()) {
625 d->disconnectCompleter();
626 d->control->completer()->setWidget(
nullptr);
627 if (
d->control->completer()->parent() ==
this)
628 delete d->control->completer();
630 d->control->setCompleter(
c);
633 if (
c->widget() ==
nullptr)
636 d->connectCompleter();
647 return d->control->completer();
665 const QMargins tm =
d->effectiveTextMargins();
668 +
d->topmargin +
d->bottommargin;
671 +
d->leftmargin +
d->rightmargin;
689 const QMargins tm =
d->effectiveTextMargins();
692 +
d->topmargin +
d->bottommargin;
695 +
d->leftmargin +
d->rightmargin;
714 return d->control->cursorPosition();
720 d->control->setCursorPosition(
pos);
730 return d->xToPos(
pos.
x());
750 return QFlag(
d->alignment);
772 d->control->cursorForward(mark, steps);
797 d->control->cursorWordForward(mark);
810 d->control->cursorWordBackward(mark);
825 d->control->backspace();
854 d->control->home(mark);
869 d->control->end(mark);
894 return d->control->isModified();
919 return d->control->hasSelectedText();
937 return d->control->selectedText();
952 return d->control->selectionStart();
967 return d->control->selectionEnd();
993 if (
Q_UNLIKELY(start < 0 || start > (
int)
d->control->end())) {
994 qWarning(
"QLineEdit::setSelection: Invalid start position (%d)",
start);
1000 if (
d->control->hasSelectedText()){
1004 d->setCursorVisible(
false);
1021 return d->control->isUndoAvailable();
1037 return d->control->isRedoAvailable();
1051 return d->dragEnabled;
1080 return d->control->cursorMoveStyle();
1086 d->control->setCursorMoveStyle(
style);
1101 return d->control->hasAcceptableInput();
1125 d->textMargins = margins;
1139 return d->textMargins;
1233 return d->control->inputMask();
1256 d->control->selectAll();
1268 d->control->deselect();
1283 d->control->insert(newText);
1294 d->resetInputMethod();
1295 d->control->clear();
1306 d->resetInputMethod();
1316 d->resetInputMethod();
1339 return d->control->isReadOnly();
1345 if (
d->control->isReadOnly() !=
enable) {
1346 d->control->setReadOnly(
enable);
1347 d->setClearButtonEnabled(!
enable);
1356#if QT_CONFIG(accessibility)
1358 changedState.readOnly =
true;
1359 QAccessibleStateChangeEvent ev(
this, changedState);
1360 QAccessible::updateAccessibility(&ev);
1366#ifndef QT_NO_CLIPBOARD
1412 d->control->paste();
1425#if QT_CONFIG(draganddrop)
1426 }
else if (timerId ==
d->dndTimer.timerId()) {
1430 else if (timerId ==
d->tripleClickTimer.timerId())
1431 d->tripleClickTimer.stop();
1441 if (
d->control->composeMode())
1448 d->handleWindowActivate();
1450#ifndef QT_NO_SHORTCUT
1453 d->control->processShortcutOverrideEvent(ke);
1458 d->control->setBlinkingCursorEnabled(
true);
1463 d->setCursorVisible(
true);
1466 d->control->setBlinkingCursorEnabled(
false);
1467#if QT_CONFIG(action)
1472 d->positionSideWidgets();
1474 d->initMouseYThreshold();
1476#ifdef QT_KEYPAD_NAVIGATION
1477 if (QApplicationPrivate::keypadNavigationEnabled()) {
1478 if (e->
type() == QEvent::EnterEditFocus) {
1480 d->setCursorVisible(
true);
1481 d->control->setCursorBlinkEnabled(
true);
1482 }
else if (e->
type() == QEvent::LeaveEditFocus) {
1483 d->setCursorVisible(
false);
1484 d->control->setCursorBlinkEnabled(
false);
1485 if (
d->edited && (
d->control->hasAcceptableInput()
1486 ||
d->control->fixup())) {
1504 if (
d->sendMouseEventToInputContext(e))
1508#ifdef QT_KEYPAD_NAVIGATION
1512 if (
d->control->completer())
1513 d->control->completer()->complete();
1516 if (
d->tripleClickTimer.isActive() && (e->
position().
toPoint() -
d->tripleClick).manhattanLength() <
1526#if QT_CONFIG(draganddrop)
1527 if (!mark &&
d->dragEnabled &&
d->control->echoMode() ==
Normal &&
1529 if (!
d->dndTimer.isActive())
1534 d->control->moveCursor(
cursor, mark);
1545#if QT_CONFIG(draganddrop)
1546 if (
d->dndTimer.isActive()) {
1553 const bool select =
true;
1558 if (
d->mouseYThreshold > 0 && e->
position().
toPoint().y() >
d->mousePressPos.y() +
d->mouseYThreshold) {
1563 }
else if (
d->mouseYThreshold > 0 && e->
position().
toPoint().y() +
d->mouseYThreshold <
d->mousePressPos.y()) {
1568 }
else if (
d->control->composeMode() &&
select) {
1569 int startPos =
d->xToPos(
d->mousePressPos.x());
1571 if (startPos != currentPos)
1572 d->control->setSelection(startPos, currentPos - startPos);
1582 d->sendMouseEventToInputContext(e);
1590 if (
d->sendMouseEventToInputContext(e))
1592#if QT_CONFIG(draganddrop)
1594 if (
d->dndTimer.isActive()) {
1601#ifndef QT_NO_CLIPBOARD
1613 d->handleSoftwareInputPanel(e->
button(),
d->clickCausedFocus);
1614 d->clickCausedFocus = 0;
1628 if (
d->control->composeMode()) {
1629 int preeditPos =
d->control->cursor();
1630 int posInPreedit =
position -
d->control->cursor();
1631 int preeditLength =
d->control->preeditAreaText().size();
1632 bool positionOnPreedit =
false;
1634 if (posInPreedit >= 0 && posInPreedit <= preeditLength)
1635 positionOnPreedit =
true;
1637 int textLength =
d->control->end();
1638 d->control->commitPreedit();
1639 int sizeChange =
d->control->end() - textLength;
1641 if (positionOnPreedit) {
1642 if (sizeChange == 0)
1647 }
else if (
position > preeditPos) {
1649 position += (sizeChange - preeditLength);
1660 d->sendMouseEventToInputContext(e);
1716 #ifdef QT_KEYPAD_NAVIGATION
1718 switch (
event->key()) {
1720 if (QApplicationPrivate::keypadNavigationEnabled()) {
1721 if (hasEditFocus()) {
1722 setEditFocus(
false);
1723 if (
d->control->completer() &&
d->control->completer()->popup()->isVisible())
1724 d->control->completer()->popup()->hide();
1731 if (!QApplicationPrivate::keypadNavigationEnabled() || !hasEditFocus()) {
1737 if (QApplicationPrivate::keypadNavigationEnabled()) {
1739 if (!
event->text().isEmpty() &&
event->text().at(0).isPrint()
1752 if (QApplicationPrivate::keypadNavigationEnabled() && !
select && !hasEditFocus()) {
1758 d->control->processKeyEvent(
event);
1759 if (
event->isAccepted())
1760 d->control->updateCursorBlinking();
1770 d->handleSoftwareInputPanel();
1771 d->control->updateCursorBlinking();
1783 return d->cursorRect();
1796 d->updatePasswordEchoEditing(
true);
1800#ifdef QT_KEYPAD_NAVIGATION
1804 if (QApplicationPrivate::keypadNavigationEnabled()
1810 d->control->processInputMethodEvent(e);
1812#if QT_CONFIG(completer)
1829 const auto nextYPos =
next->mapToGlobal(
QPoint(0, 0)).y();
1831 if (currentYPos < nextYPos)
1850 return d->cursorRect();
1852 return d->adjustedControlRect(
d->control->anchorRect());
1860 return QVariant(
d->control->cursor()); }
1862 return QVariant(
d->control->surroundingText());
1868 if (
d->control->selectionStart() ==
d->control->selectionEnd())
1870 else if (
d->control->selectionStart() ==
d->control->cursor())
1871 return QVariant(
d->control->selectionEnd());
1873 return QVariant(
d->control->selectionStart());
1881 return d->textBeforeCursor(
d->control->cursor()); }
1887 return d->textAfterCursor(
d->control->cursor()); }
1902 if (!
d->control->inputMask().isEmpty())
1903 d->control->moveCursor(
d->control->nextMaskBlank(0));
1904 else if (!
d->control->hasSelectedText())
1909 d->clickCausedFocus = 1;
1912#ifdef QT_KEYPAD_NAVIGATION
1915 d->control->setBlinkingCursorEnabled(
true);
1920 d->setCursorVisible(
true);
1921#ifdef QT_KEYPAD_NAVIGATION
1922 d->control->setCancelText(
d->control->text());
1925#if QT_CONFIG(completer)
1926 if (
d->control->completer()) {
1927 d->control->completer()->setWidget(
this);
1928 d->connectCompleter();
1939 if (
d->control->passwordEchoEditing()) {
1942 d->updatePasswordEchoEditing(
false);
1950 d->setCursorVisible(
false);
1951 d->control->setBlinkingCursorEnabled(
false);
1952#ifdef QT_KEYPAD_NAVIGATION
1954 if (!QApplicationPrivate::keypadNavigationEnabled())
1963#ifdef QT_KEYPAD_NAVIGATION
1964 d->control->setCancelText(
QString());
1966#if QT_CONFIG(completer)
1967 if (
d->control->completer())
1968 d->disconnectCompleter();
1985 r =
r.marginsRemoved(
d->effectiveTextMargins());
1990 if (
d->shouldShowPlaceholderText())
1991 fmHeight = fm.boundingRect(
d->placeholderText).height();
1993 fmHeight = fm.boundingRect(
d->control->text() +
d->control->preeditAreaText()).height();
1994 fmHeight =
qMax(fmHeight, fm.height());
2006 d->vscroll =
r.y() + (
r.height() - fmHeight + 1) / 2;
2012 if (
d->shouldShowPlaceholderText()) {
2013 if (!
d->placeholderText.isEmpty()) {
2017 QPen oldpen =
p.pen();
2020 p.setLayoutDirection(layoutDir);
2023 p.drawText(lineRect, alignPhText, elidedText);
2025 p.setLayoutDirection(oldLayoutDir);
2029 int cix =
qRound(
d->control->cursorToX());
2036 int widthUsed =
qRound(
d->control->naturalTextWidth()) + 1;
2037 if (widthUsed <= lineRect.width()) {
2041 d->hscroll = widthUsed - lineRect.width() + 1;
2044 d->hscroll = (widthUsed - lineRect.width()) / 2;
2051 }
else if (cix -
d->hscroll >= lineRect.width()) {
2053 d->hscroll = cix - lineRect.width() + 1;
2054 }
else if (cix -
d->hscroll < 0 &&
d->hscroll < widthUsed) {
2057 }
else if (widthUsed -
d->hscroll < lineRect.width()) {
2060 d->hscroll = widthUsed - lineRect.width() + 1;
2063 d->hscroll =
qMax(0,
d->hscroll);
2068 QPoint topLeft = lineRect.topLeft() -
QPoint(
d->hscroll,
d->control->ascent() - fm.ascent());
2071#ifndef QT_NO_STYLE_STYLESHEET
2073 cssStyle->styleSheetPalette(
this, &
panel, &pal);
2080#ifdef QT_KEYPAD_NAVIGATION
2081 if (!QApplicationPrivate::keypadNavigationEnabled() || hasEditFocus())
2083 if (
d->control->hasSelectedText() || (
d->cursorVisible && !
d->control->inputMask().isEmpty() && !
d->control->isReadOnly())){
2086 if (
d->control->palette() != pal
2088 d->control->setPalette(pal);
2096 if (
d->cursorVisible && !
d->control->isReadOnly() &&
d->control->inputMask().isEmpty())
2100 d->control->draw(&
p, topLeft,
r,
flags);
2105#if QT_CONFIG(draganddrop)
2108void QLineEdit::dragMoveEvent(QDragMoveEvent *e)
2111 if (!
d->control->isReadOnly() && e->mimeData()->hasFormat(
"text/plain"_L1)) {
2112 e->acceptProposedAction();
2113 d->control->moveCursor(
d->xToPos(e->position().toPoint().x()),
false);
2114 d->cursorVisible =
true;
2120void QLineEdit::dragEnterEvent(QDragEnterEvent * e)
2122 QLineEdit::dragMoveEvent(e);
2126void QLineEdit::dragLeaveEvent(QDragLeaveEvent *)
2129 if (
d->cursorVisible) {
2130 d->cursorVisible =
false;
2136void QLineEdit::dropEvent(QDropEvent* e)
2141 if (!
str.
isNull() && !
d->control->isReadOnly()) {
2144 int cursorPos =
d->xToPos(e->position().toPoint().x());
2145 int selStart = cursorPos;
2146 int oldSelStart =
d->control->selectionStart();
2147 int oldSelEnd =
d->control->selectionEnd();
2148 d->control->moveCursor(cursorPos,
false);
2149 d->cursorVisible =
false;
2150 e->acceptProposedAction();
2152 if (e->source() ==
this) {
2154 if (selStart > oldSelStart && selStart <= oldSelEnd)
2156 else if (selStart > oldSelEnd)
2172#ifndef QT_NO_CONTEXTMENU
2213 action->
setEnabled(
d->control->isUndoAvailable());
2219 action->
setEnabled(
d->control->isRedoAvailable());
2227#ifndef QT_NO_CLIPBOARD
2230 action->
setEnabled(!
d->control->isReadOnly() &&
d->control->hasSelectedText()
2254 action = popup->
addAction(QLineEdit::tr(
"Delete"));
2255 action->
setEnabled(!
d->control->isReadOnly() && !
d->control->text().isEmpty() &&
d->control->hasSelectedText());
2259 d->control, &QWidgetLineControl::_q_deleteSelected);
2266 action->
setEnabled(!
d->control->text().isEmpty() && !
d->control->allSelected());
2269 d->selectAllAction = action;
2275 popup->
addMenu(ctrlCharacterMenu);
2292 d->control->setFont(
font());
2304#if QT_CONFIG(toolbutton)
2305 for (
const auto &e :
d->trailingSideWidgets) {
2307 static_cast<QLineEditIconButton *
>(e.widget)->
setIcon(
d->clearButtonIcon());
2310 d->positionSideWidgets();
2320#include "moc_qlineedit.cpp"
static bool isEqual(const aiUVTransform &a, const aiUVTransform &b)
The QActionEvent class provides an event that is generated when a QAction is added,...
The QAction class provides an abstraction for user commands that can be added to different user inter...
void triggered(bool checked=false)
This signal is emitted when an action is activated by the user; for example, when the user clicks a m...
static QWidget * activePopupWidget()
Returns the active popup widget.
int startDragTime
the time in milliseconds that a mouse button must be held down before a drag and drop operation will ...
int doubleClickInterval
the time limit in milliseconds that distinguishes a double click from two consecutive mouse clicks
int startDragDistance
the minimum distance required for a drag and drop operation to start.
const QColor & color() const
Returns the brush color.
The QColor class provides colors based on RGB, HSV or CMYK values.
The QCompleter class provides completions based on an item model.
static bool sendEvent(QObject *receiver, QEvent *event)
Sends event event directly to receiver receiver, using the notify() function.
friend class QApplicationPrivate
Type type() const
Returns the event type.
The QFocusEvent class contains event parameters for widget focus events.
Qt::FocusReason reason() const
Returns the reason for this focus event.
\reentrant \inmodule QtGui
static QClipboard * clipboard()
Returns the object for interacting with the clipboard.
static QStyleHints * styleHints()
Returns the application's style hints.
The QIcon class provides scalable icons in different modes and states.
The QKeyEvent class describes a key event.
static const int horizontalMargin
static const int verticalMargin
@ SideWidgetFadeInWithText
The QLineEdit widget is a one-line text editor.
void setDragEnabled(bool b)
bool isRedoAvailable() const
void timerEvent(QTimerEvent *) override
\reimp
const QValidator * validator() const
Returns a pointer to the current input validator, or \nullptr if no validator has been set.
void mouseDoubleClickEvent(QMouseEvent *) override
\reimp
QString placeholderText
The line edit's placeholder text.
int cursorPosition
The current cursor position for this line edit.
QSize minimumSizeHint() const override
Returns a minimum size for the line edit.
Qt::CursorMoveStyle cursorMoveStyle
The movement style of the cursor in this line edit.
bool isUndoAvailable() const
void setValidator(const QValidator *)
Sets the validator for values of line edit to v.
void setTextMargins(int left, int top, int right, int bottom)
void keyReleaseEvent(QKeyEvent *) override
\reimp
bool isClearButtonEnabled() const
QSize sizeHint() const override
Returns a recommended size for the widget.
QLineEdit(QWidget *parent=nullptr)
Constructs a line edit with no text.
void setClearButtonEnabled(bool enable)
bool event(QEvent *) override
\reimp
void contextMenuEvent(QContextMenuEvent *) override
Shows the standard context menu created with createStandardContextMenu().
QVariant inputMethodQuery(Qt::InputMethodQuery) const override
\reimp
void cursorForward(bool mark, int steps=1)
Moves the cursor forward steps characters.
int maxLength
The maximum permitted length of the text.
QMargins textMargins() const
void cut()
Copies the selected text to the clipboard and deletes it, if there is any, and if echoMode() is \l No...
void setCursorMoveStyle(Qt::CursorMoveStyle style)
int selectionEnd() const
Returns the index of the character directly after the selection in the line edit (or -1 if no text is...
void setAlignment(Qt::Alignment flag)
void selectAll()
Selects all the text (highlights it) and moves the cursor to the end.
void redo()
Redoes the last operation if redo is \l{QLineEdit::redoAvailable}{available}.
void backspace()
If no text is selected, deletes the character to the left of the text cursor, and moves the cursor on...
void insert(const QString &)
Deletes any selected text, inserts newText, and validates the result.
EchoMode echoMode
The line edit's echo mode.
bool hasSelectedText
Whether there is any text selected.
bool hasAcceptableInput() const
void clear()
Clears the contents of the line edit.
int selectionStart() const
Returns the index of the first selected character in the line edit (or -1 if no text is selected).
QString displayText
The displayed text.
void setPlaceholderText(const QString &)
int selectionLength() const
Returns the length of the selection.
void mouseReleaseEvent(QMouseEvent *) override
\reimp
void mousePressEvent(QMouseEvent *) override
\reimp
QMenu * createStandardContextMenu()
Creates the standard context menu, which is shown when the user clicks on the line edit with the righ...
void setInputMask(const QString &inputMask)
void cursorWordBackward(bool mark)
Moves the cursor one word backward.
QString selectedText
The selected text.
void end(bool mark)
Moves the text cursor to the end of the line unless it is already there.
virtual void initStyleOption(QStyleOptionFrame *option) const
Initialize option with the values from this QLineEdit.
~QLineEdit()
Destroys the line edit.
bool modified
Whether the line edit's contents has been modified by the user.
void setCursorPosition(int)
void changeEvent(QEvent *) override
\reimp
void focusOutEvent(QFocusEvent *) override
\reimp
void copy() const
Copies the selected text to the clipboard, if there is any, and if echoMode() is \l Normal.
void cursorBackward(bool mark, int steps=1)
Moves the cursor back steps characters.
void home(bool mark)
Moves the text cursor to the beginning of the line unless it is already there.
void setText(const QString &)
void setEchoMode(EchoMode)
QString inputMask
The validation input mask.
void setSelection(int, int)
Selects text from position start and for length characters.
void editingFinished()
This signal is emitted when the Return or Enter key is used, or if the line edit loses focus and its ...
void deselect()
Deselects any selected text.
QString text
The line edit's text.
void paste()
Inserts the clipboard's text at the cursor position, deleting any selected text, providing the line e...
void keyPressEvent(QKeyEvent *) override
Converts the given key press event into a line edit action.
void cursorWordForward(bool mark)
Moves the cursor one word forward.
void del()
If no text is selected, deletes the character to the right of the text cursor.
EchoMode
This enum type describes how a line edit should display its contents.
void inputMethodEvent(QInputMethodEvent *) override
\reimp
void focusInEvent(QFocusEvent *) override
\reimp
int cursorPositionAt(const QPoint &pos)
Returns the cursor position under the point pos.
bool dragEnabled
Whether the line edit starts a drag if the user presses and moves the mouse on some selected text.
void mouseMoveEvent(QMouseEvent *) override
\reimp
void paintEvent(QPaintEvent *) override
\reimp
Qt::Alignment alignment
The alignment of the line edit.
void undo()
Undoes the last operation if undo is \l{QLineEdit::undoAvailable}{available}.
constexpr int bottom() const noexcept
Returns the bottom margin.
constexpr int left() const noexcept
Returns the left margin.
constexpr int right() const noexcept
Returns the right margin.
constexpr int top() const noexcept
Returns the top margin.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
Q_WEAK_OVERLOAD void setObjectName(const QString &name)
Sets the object's name to name.
The QPaintEvent class contains event parameters for paint events.
The QPainter class performs low-level painting on widgets and other paint devices.
The QPalette class contains color groups for each widget state.
const QBrush & text() const
Returns the text foreground brush of the current color group.
const QBrush & placeholderText() const
ColorGroup currentColorGroup() const
Returns the palette's current color group.
\inmodule QtCore\reentrant
constexpr qreal x() const noexcept
Returns the x coordinate of this point.
constexpr qreal y() const noexcept
Returns the y coordinate of this point.
constexpr QPoint toPoint() const
Rounds the coordinates of this point to the nearest integer, and returns a QPoint object with the rou...
bool isNull() const noexcept
Returns true if both the x and y coordinates are set to 0.0 (ignoring the sign); otherwise returns fa...
\inmodule QtCore\reentrant
constexpr int x() const noexcept
Returns the x coordinate of this point.
\inmodule QtCore\reentrant
QPointF position() const
Returns the position of the point in this event, relative to the widget or item that received the eve...
Qt::MouseButton button() const
Returns the button that caused the event.
Qt::MouseButtons buttons() const
Returns the button state when the event was generated.
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool isEmpty() const noexcept
Returns true if the string has no characters; otherwise returns false.
bool isNull() const
Returns true if this string is null; otherwise returns false.
qsizetype size() const noexcept
Returns the number of characters in this string.
\variable QStyleOptionFocusRect::backgroundColor
static Qt::Alignment visualAlignment(Qt::LayoutDirection direction, Qt::Alignment alignment)
Transforms an alignment of Qt::AlignLeft or Qt::AlignRight without Qt::AlignAbsolute into Qt::AlignLe...
virtual QSize sizeFromContents(ContentsType ct, const QStyleOption *opt, const QSize &contentsSize, const QWidget *w=nullptr) const =0
Returns the size of the element described by the specified option and type, based on the provided con...
@ SH_LineEdit_PasswordMaskDelay
@ SH_LineEdit_PasswordCharacter
@ SH_BlinkCursorWhenTextSelected
virtual QRect subElementRect(SubElement subElement, const QStyleOption *option, const QWidget *widget=nullptr) const =0
Returns the sub-area for the given element as described in the provided style option.
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) const =0
Returns the value of the given pixel metric.
virtual void drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *w=nullptr) const =0
Draws the given primitive element with the provided painter using the style options specified by opti...
@ CursorBetweenCharacters
bool singleShot
whether the timer is a single-shot timer
The QValidator class provides validation of input text.
Combined button and popup list for selecting options.
@ ActiveWindowFocusReason
int qRound(qfloat16 d) noexcept
static const char clearButtonActionNameC[]
constexpr const T & qBound(const T &min, const T &val, const T &max)
constexpr const T & qMax(const T &a, const T &b)
static bool contains(const QJsonArray &haystack, unsigned needle)
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLfloat GLfloat GLfloat w
[0]
GLenum GLuint GLenum GLsizei length
GLdouble GLdouble GLdouble GLdouble top
GLfloat GLfloat GLfloat GLfloat h
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
#define QStringLiteral(str)
QStyleSheetStyle * qt_styleSheet(QStyle *style)
void setActionIcon(QAction *action, const QString &name)
selection select(topLeft, bottomRight)
myAction setIcon(SomeIcon)