Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |

# Compatibility Members for QLineEdit

The following class members are part of the Qt 3 compatibility layer. They are provided to help you port old code to Qt 4. We strongly advise against using them in new code.

QLineEdit class reference

### 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 clearValidator ()
- void cursorLeft ( bool mark, int steps = 1 )
- void cursorRight ( bool mark, int steps = 1 )
- bool edited () const
- bool frame () const
- bool hasMarkedText () const
- QString markedText () const
- void setEdited ( bool on )

### Protected Functions

- void repaintArea ( int a, int b )

## 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

###

### 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.

### bool QLineEdit::frame () const

Use hasFrame() instead.

### bool QLineEdit::hasMarkedText () const

Use hasSelectedText() instead.

### QString QLineEdit::markedText () const

Use selectedText() instead.

### void QLineEdit::repaintArea ( int a, int b ) `[protected]`

Use update() instead.

### void QLineEdit::setEdited ( bool on )

To set isModified() to false use clearModified() or setText.