Compatibility Members for QLineEdit
The following members of class QLineEditare part of the Qt compatibility layer. We advise against using them in new code.
Public Functions
QLineEdit(QWidget * parent, const char * name) | |
QLineEdit(const QString & contents, QWidget * parent, const char * name) | |
QLineEdit(const QString & contents, const QString & inputMask, QWidget * parent = 0, const char * name = 0) | |
int | characterAt(int xpos, QChar * chr) const |
void | clearModified() |
void | clearValidator() |
void | cursorLeft(bool mark, int steps = 1) |
void | cursorRight(bool mark, int steps = 1) |
bool | edited() const |
bool | frame() const |
bool | getSelection(int * start, int * end) |
bool | hasMarkedText() const |
int | margin() const |
QString | markedText() const |
void | setEdited(bool on) |
void | setMargin(int margin) |
- 57 public functions inherited from QWidget
- 8 public functions inherited from QObject
- 8 public functions inherited from QPaintDevice
Signals
void | lostFocus() |
Protected Functions
void | repaintArea(int a, int b) |
- 1 protected function inherited from QObject
Member Function Documentation
QLineEdit::QLineEdit(QWidget * parent, const char * name)
Constructs a line edit with no text.
The maximum text length is set to 32767 characters.
The parent and name arguments are sent to the QWidget constructor.
See also setText() and setMaxLength().
QLineEdit::QLineEdit(const QString & contents, QWidget * parent, const char * name)
Constructs a line edit containing the text contents.
The cursor position is set to the end of the line and the maximum text length to 32767 characters.
The parent and name arguments are sent to the QWidget constructor.
See also text() and setMaxLength().
QLineEdit::QLineEdit(const QString & contents, const QString & inputMask, QWidget * parent = 0, const char * name = 0)
Constructs a line edit with an input inputMask and the text contents.
The cursor position is set to the end of the line and the maximum text length is set to the length of the mask (the number of mask characters and separators).
The parent and name arguments are sent to the QWidget constructor.
See also setMask() and text().
int QLineEdit::characterAt(int xpos, QChar * chr) const
There exists no equivalent functionality in Qt 4.
void QLineEdit::clearModified()
Use setModified(false) instead.
See also isModified().
void QLineEdit::clearValidator()
Use setValidator(0) instead.
void QLineEdit::cursorLeft(bool mark, int steps = 1)
Use cursorForward() with a negative number of steps instead. For example, cursorForward(mark, -steps).
void QLineEdit::cursorRight(bool mark, int steps = 1)
Use cursorForward() instead.
bool QLineEdit::edited() const
Use isModified() instead.
See also setEdited().
bool QLineEdit::frame() const
Use hasFrame() instead.
See also setFrame().
bool QLineEdit::getSelection(int * start, int * end)
Use selectedText() and selectionStart() instead.
bool QLineEdit::hasMarkedText() const
Use hasSelectedText() instead.
[signal]
void QLineEdit::lostFocus()
This signal is emitted when the line edit has lost focus.
Use editingFinished() instead
See also editingFinished() and returnPressed().
int QLineEdit::margin() const
Returns the width of the margin around the contents of the widget.
Use QWidget::getContentsMargins() instead.
See also setMargin() and QWidget::getContentsMargins().
QString QLineEdit::markedText() const
Use selectedText() instead.
[protected]
void QLineEdit::repaintArea(int a, int b)
Use update() instead.
void QLineEdit::setEdited(bool on)
Use setModified() or setText().
See also edited().
void QLineEdit::setMargin(int margin)
Sets the width of the margin around the contents of the widget to margin.
Use QWidget::setContentsMargins() instead.
See also margin() and QWidget::setContentsMargins().
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.