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;
279 return d->control->text();
309 return d->placeholderText;
317 if (
d->shouldShowPlaceholderText())
339 return d->control->displayText();
364 return d->control->maxLength();
446static const char clearButtonActionNameC[] = "_q_qlineeditclearaction";
461 widgetAction->setVisible(!
text().isEmpty());
465 d->removeAction(clearAction);
535 return (
EchoMode)
d->control->echoMode();
549 d->control->setEchoMode(
mode);
554#ifndef QT_NO_VALIDATOR
565 return d->control->validator();
591 d->control->setValidator(
v);
595#if QT_CONFIG(completer)
615 if (
c ==
d->control->completer())
617 if (
d->control->completer()) {
618 disconnect(
d->control->completer(),
nullptr,
this,
nullptr);
619 d->control->completer()->setWidget(
nullptr);
620 if (
d->control->completer()->parent() ==
this)
621 delete d->control->completer();
623 d->control->setCompleter(
c);
626 if (
c->widget() ==
nullptr)
644 return d->control->completer();
662 const QMargins tm =
d->effectiveTextMargins();
665 +
d->topmargin +
d->bottommargin;
668 +
d->leftmargin +
d->rightmargin;
686 const QMargins tm =
d->effectiveTextMargins();
689 +
d->topmargin +
d->bottommargin;
692 +
d->leftmargin +
d->rightmargin;
711 return d->control->cursorPosition();
717 d->control->setCursorPosition(
pos);
727 return d->xToPos(
pos.
x());
747 return QFlag(
d->alignment);
769 d->control->cursorForward(mark, steps);
794 d->control->cursorWordForward(mark);
807 d->control->cursorWordBackward(mark);
822 d->control->backspace();
851 d->control->home(mark);
866 d->control->end(mark);
891 return d->control->isModified();
916 return d->control->hasSelectedText();
934 return d->control->selectedText();
949 return d->control->selectionStart();
964 return d->control->selectionEnd();
990 if (
Q_UNLIKELY(start < 0 || start > (
int)
d->control->end())) {
991 qWarning(
"QLineEdit::setSelection: Invalid start position (%d)",
start);
997 if (
d->control->hasSelectedText()){
1001 d->setCursorVisible(
false);
1018 return d->control->isUndoAvailable();
1034 return d->control->isRedoAvailable();
1048 return d->dragEnabled;
1076 return d->control->cursorMoveStyle();
1082 d->control->setCursorMoveStyle(
style);
1097 return d->control->hasAcceptableInput();
1121 d->textMargins = margins;
1135 return d->textMargins;
1223 return d->control->inputMask();
1244 d->control->selectAll();
1256 d->control->deselect();
1271 d->control->insert(newText);
1282 d->resetInputMethod();
1283 d->control->clear();
1294 d->resetInputMethod();
1304 d->resetInputMethod();
1327 return d->control->isReadOnly();
1333 if (
d->control->isReadOnly() !=
enable) {
1334 d->control->setReadOnly(
enable);
1335 d->setClearButtonEnabled(!
enable);
1344#if QT_CONFIG(accessibility)
1346 changedState.readOnly =
true;
1347 QAccessibleStateChangeEvent ev(
this, changedState);
1348 QAccessible::updateAccessibility(&ev);
1354#ifndef QT_NO_CLIPBOARD
1400 d->control->paste();
1413#if QT_CONFIG(draganddrop)
1414 }
else if (timerId ==
d->dndTimer.timerId()) {
1418 else if (timerId ==
d->tripleClickTimer.timerId())
1419 d->tripleClickTimer.stop();
1429 if (
d->control->composeMode())
1435#ifndef QT_NO_SHORTCUT
1438 d->control->processShortcutOverrideEvent(ke);
1443 d->control->setBlinkingCursorEnabled(
true);
1448 d->setCursorVisible(
true);
1450#if QT_CONFIG(action)
1455 d->positionSideWidgets();
1457 d->initMouseYThreshold();
1459#ifdef QT_KEYPAD_NAVIGATION
1460 if (QApplicationPrivate::keypadNavigationEnabled()) {
1461 if (
e->type() == QEvent::EnterEditFocus) {
1463 d->setCursorVisible(
true);
1464 d->control->setCursorBlinkEnabled(
true);
1465 }
else if (
e->type() == QEvent::LeaveEditFocus) {
1466 d->setCursorVisible(
false);
1467 d->control->setCursorBlinkEnabled(
false);
1468 if (
d->edited && (
d->control->hasAcceptableInput()
1469 ||
d->control->fixup())) {
1485 d->mousePressPos =
e->position().toPoint();
1487 if (
d->sendMouseEventToInputContext(
e))
1491#ifdef QT_KEYPAD_NAVIGATION
1495 if (
d->control->completer())
1496 d->control->completer()->complete();
1499 if (
d->tripleClickTimer.isActive() && (
e->position().toPoint() -
d->tripleClick).manhattanLength() <
1508 int cursor =
d->xToPos(
e->position().toPoint().x());
1509#if QT_CONFIG(draganddrop)
1510 if (!mark &&
d->dragEnabled &&
d->control->echoMode() ==
Normal &&
1512 if (!
d->dndTimer.isActive())
1517 d->control->moveCursor(
cursor, mark);
1528#if QT_CONFIG(draganddrop)
1529 if (
d->dndTimer.isActive()) {
1536 const bool select =
true;
1541 if (
d->mouseYThreshold > 0 &&
e->position().toPoint().y() >
d->mousePressPos.y() +
d->mouseYThreshold) {
1546 }
else if (
d->mouseYThreshold > 0 &&
e->position().toPoint().y() +
d->mouseYThreshold <
d->mousePressPos.y()) {
1551 }
else if (
d->control->composeMode() &&
select) {
1552 int startPos =
d->xToPos(
d->mousePressPos.x());
1553 int currentPos =
d->xToPos(
e->position().toPoint().x());
1554 if (startPos != currentPos)
1555 d->control->setSelection(startPos, currentPos - startPos);
1560 d->control->moveCursor(
d->xToPos(
e->position().toPoint().x()),
select);
1565 d->sendMouseEventToInputContext(
e);
1573 if (
d->sendMouseEventToInputContext(
e))
1575#if QT_CONFIG(draganddrop)
1577 if (
d->dndTimer.isActive()) {
1584#ifndef QT_NO_CLIPBOARD
1596 d->handleSoftwareInputPanel(
e->button(),
d->clickCausedFocus);
1597 d->clickCausedFocus = 0;
1607 int position =
d->xToPos(
e->position().toPoint().x());
1611 if (
d->control->composeMode()) {
1612 int preeditPos =
d->control->cursor();
1613 int posInPreedit =
position -
d->control->cursor();
1614 int preeditLength =
d->control->preeditAreaText().size();
1615 bool positionOnPreedit =
false;
1617 if (posInPreedit >= 0 && posInPreedit <= preeditLength)
1618 positionOnPreedit =
true;
1620 int textLength =
d->control->end();
1621 d->control->commitPreedit();
1622 int sizeChange =
d->control->end() - textLength;
1624 if (positionOnPreedit) {
1625 if (sizeChange == 0)
1630 }
else if (
position > preeditPos) {
1632 position += (sizeChange - preeditLength);
1641 d->tripleClick =
e->position().toPoint();
1643 d->sendMouseEventToInputContext(
e);
1700 #ifdef QT_KEYPAD_NAVIGATION
1702 switch (
event->key()) {
1704 if (QApplicationPrivate::keypadNavigationEnabled()) {
1705 if (hasEditFocus()) {
1706 setEditFocus(
false);
1707 if (
d->control->completer() &&
d->control->completer()->popup()->isVisible())
1708 d->control->completer()->popup()->hide();
1715 if (!QApplicationPrivate::keypadNavigationEnabled() || !hasEditFocus()) {
1721 if (QApplicationPrivate::keypadNavigationEnabled()) {
1723 if (!
event->text().isEmpty() &&
event->text().at(0).isPrint()
1736 if (QApplicationPrivate::keypadNavigationEnabled() && !
select && !hasEditFocus()) {
1742 d->control->processKeyEvent(
event);
1743 if (
event->isAccepted())
1744 d->control->updateCursorBlinking();
1754 d->handleSoftwareInputPanel();
1755 d->control->updateCursorBlinking();
1767 return d->cursorRect();
1780 d->updatePasswordEchoEditing(
true);
1784#ifdef QT_KEYPAD_NAVIGATION
1788 if (QApplicationPrivate::keypadNavigationEnabled()
1790 && !
e->preeditString().isEmpty())
1794 d->control->processInputMethodEvent(
e);
1796#if QT_CONFIG(completer)
1797 if (!
e->commitString().isEmpty())
1813 const auto nextYPos =
next->mapToGlobal(
QPoint(0, 0)).y();
1815 if (currentYPos < nextYPos)
1834 return d->cursorRect();
1836 return d->adjustedControlRect(
d->control->anchorRect());
1844 return QVariant(
d->control->cursor()); }
1846 return QVariant(
d->control->surroundingText());
1852 if (
d->control->selectionStart() ==
d->control->selectionEnd())
1854 else if (
d->control->selectionStart() ==
d->control->cursor())
1855 return QVariant(
d->control->selectionEnd());
1857 return QVariant(
d->control->selectionStart());
1865 return d->textBeforeCursor(
d->control->cursor()); }
1871 return d->textAfterCursor(
d->control->cursor()); }
1886 if (!
d->control->inputMask().isEmpty())
1887 d->control->moveCursor(
d->control->nextMaskBlank(0));
1888 else if (!
d->control->hasSelectedText())
1893 d->clickCausedFocus = 1;
1896#ifdef QT_KEYPAD_NAVIGATION
1897 if (!QApplicationPrivate::keypadNavigationEnabled() || (hasEditFocus() && (
e->reason() ==
Qt::PopupFocusReason))) {
1899 d->control->setBlinkingCursorEnabled(
true);
1904 d->setCursorVisible(
true);
1905#ifdef QT_KEYPAD_NAVIGATION
1906 d->control->setCancelText(
d->control->text());
1909#if QT_CONFIG(completer)
1910 if (
d->control->completer()) {
1911 d->control->completer()->setWidget(
this);
1926 if (
d->control->passwordEchoEditing()) {
1929 d->updatePasswordEchoEditing(
false);
1937 d->setCursorVisible(
false);
1938 d->control->setBlinkingCursorEnabled(
false);
1939#ifdef QT_KEYPAD_NAVIGATION
1941 if (!QApplicationPrivate::keypadNavigationEnabled())
1950#ifdef QT_KEYPAD_NAVIGATION
1951 d->control->setCancelText(
QString());
1953#if QT_CONFIG(completer)
1954 if (
d->control->completer()) {
1978 if (
d->shouldShowPlaceholderText())
1994 d->vscroll =
r.y() + (
r.height() - fmHeight + 1) / 2;
2000 if (
d->shouldShowPlaceholderText()) {
2001 if (!
d->placeholderText.isEmpty()) {
2005 QPen oldpen =
p.pen();
2008 p.setLayoutDirection(layoutDir);
2011 p.drawText(lineRect, alignPhText, elidedText);
2013 p.setLayoutDirection(oldLayoutDir);
2017 int cix =
qRound(
d->control->cursorToX());
2024 int widthUsed =
qRound(
d->control->naturalTextWidth()) + 1;
2025 if (widthUsed <= lineRect.
width()) {
2029 d->hscroll = widthUsed - lineRect.
width() + 1;
2032 d->hscroll = (widthUsed - lineRect.
width()) / 2;
2039 }
else if (cix -
d->hscroll >= lineRect.
width()) {
2041 d->hscroll = cix - lineRect.
width() + 1;
2042 }
else if (cix -
d->hscroll < 0 &&
d->hscroll < widthUsed) {
2045 }
else if (widthUsed -
d->hscroll < lineRect.
width()) {
2048 d->hscroll = widthUsed - lineRect.
width() + 1;
2051 d->hscroll =
qMax(0,
d->hscroll);
2059#ifndef QT_NO_STYLE_STYLESHEET
2061 cssStyle->styleSheetPalette(
this, &
panel, &pal);
2068#ifdef QT_KEYPAD_NAVIGATION
2069 if (!QApplicationPrivate::keypadNavigationEnabled() || hasEditFocus())
2071 if (
d->control->hasSelectedText() || (
d->cursorVisible && !
d->control->inputMask().isEmpty() && !
d->control->isReadOnly())){
2074 if (
d->control->palette() != pal
2076 d->control->setPalette(pal);
2084 if (
d->cursorVisible && !
d->control->isReadOnly() &&
d->control->inputMask().isEmpty())
2088 d->control->draw(&
p, topLeft,
r,
flags);
2093#if QT_CONFIG(draganddrop)
2096void QLineEdit::dragMoveEvent(QDragMoveEvent *
e)
2099 if (!
d->control->isReadOnly() &&
e->mimeData()->hasFormat(
"text/plain"_L1)) {
2100 e->acceptProposedAction();
2101 d->control->moveCursor(
d->xToPos(
e->position().toPoint().x()),
false);
2102 d->cursorVisible =
true;
2108void QLineEdit::dragEnterEvent(QDragEnterEvent *
e)
2110 QLineEdit::dragMoveEvent(
e);
2114void QLineEdit::dragLeaveEvent(QDragLeaveEvent *)
2117 if (
d->cursorVisible) {
2118 d->cursorVisible =
false;
2124void QLineEdit::dropEvent(QDropEvent*
e)
2129 if (!
str.
isNull() && !
d->control->isReadOnly()) {
2132 int cursorPos =
d->xToPos(
e->position().toPoint().x());
2133 int selStart = cursorPos;
2134 int oldSelStart =
d->control->selectionStart();
2135 int oldSelEnd =
d->control->selectionEnd();
2136 d->control->moveCursor(cursorPos,
false);
2137 d->cursorVisible =
false;
2138 e->acceptProposedAction();
2140 if (
e->source() ==
this) {
2142 if (selStart > oldSelStart && selStart <= oldSelEnd)
2144 else if (selStart > oldSelEnd)
2160#ifndef QT_NO_CONTEXTMENU
2201 action->
setEnabled(
d->control->isUndoAvailable());
2206 action->
setEnabled(
d->control->isRedoAvailable());
2213#ifndef QT_NO_CLIPBOARD
2216 action->
setEnabled(!
d->control->isReadOnly() &&
d->control->hasSelectedText()
2237 action = popup->
addAction(QLineEdit::tr(
"Delete"));
2238 action->
setEnabled(!
d->control->isReadOnly() && !
d->control->text().isEmpty() &&
d->control->hasSelectedText());
2247 action->
setEnabled(!
d->control->text().isEmpty() && !
d->control->allSelected());
2249 d->selectAllAction = action;
2255 popup->
addMenu(ctrlCharacterMenu);
2272 d->control->setFont(
font());
2284#if QT_CONFIG(toolbutton)
2285 for (
const auto &
e :
d->trailingSideWidgets) {
2287 static_cast<QLineEditIconButton *
>(
e.widget)->
setIcon(
d->clearButtonIcon());
2290 d->positionSideWidgets();
2300#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...
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.
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 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.
\reentrant \inmodule QtGui
int height() const
Returns the height of the font.
QRect boundingRect(QChar) const
Returns the rectangle that is covered by ink if character ch were to be drawn at the origin of the co...
QString elidedText(const QString &text, Qt::TextElideMode mode, int width, int flags=0) const
int maxWidth() const
Returns the width of the widest character in the font.
int horizontalAdvance(const QString &, int len=-1) const
Returns the horizontal advance in pixels of the first len characters of text.
int ascent() const
Returns the ascent of the font.
int leading() const
Returns the leading of the font.
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 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)
Sets the margins around the text inside the frame to have the sizes left, top, right,...
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 (i.e.
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 one...
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()
This function creates the standard context menu which is shown when the user clicks on the line edit ...
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 pressed, or if the line edit loses focus and i...
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 lineedit 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
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
\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.
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
constexpr int height() const noexcept
Returns the height of the rectangle.
constexpr QRect marginsRemoved(const QMargins &margins) const noexcept
Removes the margins from the rectangle, shrinking it.
constexpr QPoint topLeft() const noexcept
Returns the position of the rectangle's top-left corner.
constexpr int width() const noexcept
Returns the width of the rectangle.
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool isNull() const
Returns true if this string is null; otherwise returns false.
qsizetype size() const
Returns the number of characters in this string.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
bool useRtlExtensions
the writing direction.
\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)
myObject disconnect()
[26]
selection select(topLeft, bottomRight)
myAction setIcon(SomeIcon)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent