Qyoto  4.0.7
Qyoto is a C# language binding for Qt
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties
QtGui.QLineEdit Class Reference

The QLineEdit widget is a one-line text editor. More...

Inheritance diagram for QtGui.QLineEdit:
Collaboration diagram for QtGui.QLineEdit:

Public Types

enum  EchoMode { NoEcho = 1, Normal = 0, Password = 2, PasswordEchoOnEdit = 3 }
  More...
 
- Public Types inherited from QtGui.QWidget
enum  RenderFlag { DrawChildren = 2, DrawWindowBackground = 1, IgnoreMask = 4 }
  More...
 

Public Member Functions

 QLineEdit (QWidget parent=null)
  More...
 
 QLineEdit (string contents, QWidget parent=null)
  More...
 
override void CreateProxy ()
 
new void Backspace ()
  More...
 
new void Clear ()
  More...
 
new void Copy ()
  More...
 
new QMenu CreateStandardContextMenu ()
  More...
 
new void CursorBackward (bool mark, int steps=1)
  More...
 
new void CursorForward (bool mark, int steps=1)
  More...
 
new int CursorPositionAt (QPoint pos)
  More...
 
new void CursorWordBackward (bool mark)
  More...
 
new void CursorWordForward (bool mark)
  More...
 
new void Cut ()
  More...
 
new void Del ()
  More...
 
new void Deselect ()
  More...
 
new void End (bool mark)
  More...
 
override bool OnEvent (QEvent e)
  More...
 
new void GetTextMargins (ref int left, ref int top, ref int right, ref int bottom)
  More...
 
new void Home (bool mark)
  More...
 
override object InputMethodQuery (Qt.InputMethodQuery property)
  More...
 
new void Insert (string newText)
  More...
 
new void Paste ()
  More...
 
new void Redo ()
  More...
 
new void SelectAll ()
  More...
 
new void SetSelection (int start, int length)
  More...
 
new void SetTextMargins (int left, int top, int right, int bottom)
  More...
 
new void Undo ()
  More...
 
new void Dispose ()
 
- Public Member Functions inherited from QtGui.QWidget
 QWidget (QWidget parent=null, Qt.WindowType f=0)
  More...
 
override void CreateProxy ()
 
new void ActivateWindow ()
  More...
 
new void AddAction (QAction action)
  More...
 
new void AddActions (System.Collections.Generic.List< QAction > actions)
  More...
 
new void AdjustSize ()
  More...
 
new QWidget ChildAt (QPoint p)
  More...
 
new QWidget ChildAt (int x, int y)
  More...
 
new void ClearFocus ()
  More...
 
new void ClearMask ()
  More...
 
new bool Close ()
  More...
 
new void CreateWinId ()
 
new void EnsurePolished ()
  More...
 
override bool OnEvent (QEvent @event)
  More...
 
new QWidget FocusWidget ()
  More...
 
new void GetContentsMargins (ref int left, ref int top, ref int right, ref int bottom)
  More...
 
virtual System.IntPtr GetDC ()
  More...
 
new void GrabGesture (Qt.GestureType type, Qt.GestureFlag flags=0)
  More...
 
new void GrabKeyboard ()
  More...
 
new void GrabMouse ()
  More...
 
new void GrabMouse (QCursor cursor)
  More...
 
new int GrabShortcut (QKeySequence key, Qt.ShortcutContext context=Qt.ShortcutContext.WindowShortcut)
  More...
 
virtual int HeightForWidth (int w)
  More...
 
new void Hide ()
  More...
 
new void InsertAction (QAction before, QAction action)
  More...
 
new void InsertActions (QAction before, System.Collections.Generic.List< QAction > actions)
  More...
 
new bool IsAncestorOf (QWidget child)
  More...
 
new bool IsEnabledTo (QWidget ancestor)
  More...
 
new bool IsVisibleTo (QWidget ancestor)
  More...
 
new void Lower ()
  More...
 
new QPoint MapFrom (QWidget parent, QPoint pos)
  More...
 
new QPoint MapFromGlobal (QPoint pos)
  More...
 
new QPoint MapFromParent (QPoint pos)
  More...
 
new QPoint MapTo (QWidget parent, QPoint pos)
  More...
 
new QPoint MapToGlobal (QPoint pos)
  More...
 
new QPoint MapToParent (QPoint pos)
  More...
 
new void Move (int x, int y)
 
new void OverrideWindowFlags (Qt.WindowType type)
  More...
 
new void OverrideWindowState (Qt.WindowState state)
 
new void Raise ()
  More...
 
virtual void ReleaseDC (System.IntPtr hdc)
  More...
 
new void ReleaseKeyboard ()
  More...
 
new void ReleaseMouse ()
  More...
 
new void ReleaseShortcut (int id)
  More...
 
new void RemoveAction (QAction action)
  More...
 
new void Render (IQPaintDevice target)
  More...
 
new void Render (QPainter painter)
  More...
 
new void Render (IQPaintDevice target, QPoint targetOffset)
  More...
 
new void Render (QPainter painter, QPoint targetOffset)
  More...
 
new void Render (IQPaintDevice target, QPoint targetOffset, QRegion sourceRegion, QWidget.RenderFlag renderFlags=QWidget.RenderFlag.DrawWindowBackground|QWidget.RenderFlag.DrawChildren)
  More...
 
new void Render (QPainter painter, QPoint targetOffset, QRegion sourceRegion, QWidget.RenderFlag renderFlags=QWidget.RenderFlag.DrawWindowBackground|QWidget.RenderFlag.DrawChildren)
  More...
 
new void Repaint ()
  More...
 
new void Repaint (QRect rect)
  More...
 
new void Repaint (QRegion rgn)
  More...
 
new void Repaint (int x, int y, int w, int h)
  More...
 
new void Resize (int w, int h)
 
new bool RestoreGeometry (QByteArray geometry)
  More...
 
new QByteArray SaveGeometry ()
  More...
 
new void Scroll (int dx, int dy)
  More...
 
new void Scroll (int dx, int dy, QRect r)
  More...
 
new void SetAttribute (Qt.WidgetAttribute attribute, bool on=true)
  More...
 
new void SetBaseSize (int basew, int baseh)
 
new void SetContentsMargins (int left, int top, int right, int bottom)
  More...
 
new void SetDisabled (bool disable)
  More...
 
new void SetFixedHeight (int h)
  More...
 
new void SetFixedSize (QSize s)
  More...
 
new void SetFixedSize (int w, int h)
  More...
 
new void SetFixedWidth (int w)
  More...
 
new void SetFocus ()
  More...
 
new void SetFocus (Qt.FocusReason reason)
  More...
 
new void SetGeometry (int x, int y, int w, int h)
 
new void SetHidden (bool hidden)
  More...
 
new void SetMask (QBitmap bitmap)
  More...
 
new void SetMaximumSize (int maxw, int maxh)
 
new void SetMinimumSize (int minw, int minh)
 
new void SetParent (QWidget parent)
  More...
 
new void SetParent (QWidget parent, Qt.WindowType f)
  More...
 
new void SetShortcutAutoRepeat (int id, bool enable=true)
  More...
 
new void SetShortcutEnabled (int id, bool enable=true)
  More...
 
new void SetShown (bool shown)
  More...
 
new void SetSizeIncrement (int w, int h)
 
new void SetSizePolicy (QSizePolicy.Policy horizontal, QSizePolicy.Policy vertical)
 
new void Show ()
  More...
 
new void ShowFullScreen ()
  More...
 
new void ShowMaximized ()
  More...
 
new void ShowMinimized ()
  More...
 
new void ShowNormal ()
  More...
 
new void StackUnder (QWidget w)
  More...
 
new bool TestAttribute (Qt.WidgetAttribute attribute)
  More...
 
new void UngrabGesture (Qt.GestureType type)
  More...
 
new void UnsetCursor ()
 
new void UnsetLayoutDirection ()
 
new void UnsetLocale ()
 
new void Update ()
  More...
 
new void Update (QRect rect)
  More...
 
new void Update (QRegion rgn)
  More...
 
new void Update (int x, int y, int w, int h)
  More...
 
new void UpdateGeometry ()
  More...
 
new void Dispose ()
 
- Public Member Functions inherited from QtCore.QObject
 QObject (QObject parent=null)
  More...
 
new bool BlockSignals (bool b)
  More...
 
new bool Connect (QObject sender, string signal, string member, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection)
  More...
 
new void DeleteLater ()
  More...
 
new bool Disconnect (QObject receiver, string member=null)
  More...
 
new bool Disconnect (string signal=null, QObject receiver=null, string member=null)
  More...
 
new void DumpObjectInfo ()
  More...
 
new void DumpObjectTree ()
  More...
 
virtual bool EventFilter (QObject watched, QEvent @event)
  More...
 
new bool Inherits (string classname)
  More...
 
new void InstallEventFilter (QObject filterObj)
  More...
 
new void KillTimer (int id)
  More...
 
new object Property (string name)
  More...
 
new void RemoveEventFilter (QObject obj)
  More...
 
new bool SetProperty (string name, object value)
  More...
 
new void SetUserData (uint id, QObjectUserData data)
 
new int StartTimer (int interval)
  More...
 
new QObjectUserData UserData (uint id)
 
new void Dispose ()
 
- Public Member Functions inherited from QtCore.Qt
delegate QTextStream FuncQTextStreamQTextStream (QTextStream qTextStream)
 
delegate void ActionQtMsgTypeString (QtMsgType qtMsgType, string @string)
 
delegate QObject FuncQObject ()
 
delegate string FuncStringQByteArray (QByteArray qByteArray)
 
delegate QByteArray FuncQByteArrayString (string @string)
 

Static Public Member Functions

static string Tr (string s, string c=null)
 
static string Tr (string s, string c, int n)
 
static string TrUtf8 (string s, string c=null)
 
static string TrUtf8 (string s, string c, int n)
 
- Static Public Member Functions inherited from QtGui.QWidget
static QWidget Find (NativeULong id)
  More...
 
static void SetTabOrder (QWidget first, QWidget second)
  More...
 
static string Tr (string s, string c=null)
 
static string Tr (string s, string c, int n)
 
static string TrUtf8 (string s, string c=null)
 
static string TrUtf8 (string s, string c, int n)
 
- Static Public Member Functions inherited from QtCore.QObject
static bool Connect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod method, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection)
  More...
 
static bool Connect (QObject sender, string signal, QObject receiver, string member, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection)
  More...
 
static bool Disconnect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod member)
  More...
 
static bool Disconnect (QObject sender, string signal, QObject receiver, string member)
  More...
 
static string Tr (string s, string c=null)
  More...
 
static string Tr (string s, string c, int n)
  More...
 
static string TrUtf8 (string s, string c=null)
  More...
 
static string TrUtf8 (string s, string c, int n)
  More...
 
- Static Public Member Functions inherited from QtCore.Qt
static QDataStream Write (QDataStream s, object p)
 
static QDataStream Write (QDataStream stream, QSizeF size)
  More...
 
static QDataStream Write (QDataStream stream, QPoint point)
  More...
 
static QTextStream Write (QTextStream s, Qt.FuncQTextStreamQTextStream f)
 
static QDataStream Write (QDataStream stream, QLineF line)
  More...
 
static QDataStream Write (QDataStream stream, QPointF point)
  More...
 
static QDataStream Write (QDataStream @out, QChar chr)
  More...
 
static QDataStream Write (QDataStream @out, QByteArray ba)
  More...
 
static QDataStream Write (QDataStream stream, QEasingCurve easing)
  More...
 
static QDataStream Write (QDataStream stream, QRectF rectangle)
  More...
 
static QDataStream Write (QDataStream @out, QDateTime dateTime)
  More...
 
static QDataStream Write (QDataStream @out, QUrl url)
  More...
 
static QDataStream Write (QDataStream @out, QTime time)
  More...
 
static QDataStream Write (QDataStream arg1, QLocale arg2)
 
static QDataStream Write (QDataStream @out, QBitArray ba)
  More...
 
static QDataStream Write (QDataStream s, QUuid id)
  More...
 
static QDataStream Write (QDataStream stream, QLine line)
  More...
 
static QDataStream Write (QDataStream @out, QDate date)
  More...
 
static QDataStream Write (QDataStream @out, QRegExp regExp)
  More...
 
static QDataStream Write (QDataStream stream, QRect rectangle)
  More...
 
static QDataStream Write (QDataStream stream, QSize size)
  More...
 
static QDataStream Write (QDataStream s, QVariant.Type p)
 
static QDataStream Write (QDataStream arg1, string arg2)
 
static QDataStream Write (QDataStream @out, System.Collections.Generic.List< string > list)
  More...
 
static QDataStream Read (QDataStream @in, QChar chr)
  More...
 
static QDataStream Read (QDataStream arg1, QLocale arg2)
 
static QDataStream Read (QDataStream stream, QRect rectangle)
  More...
 
static QDataStream Read (QDataStream arg1, QEasingCurve arg2)
 
static QDataStream Read (QDataStream @in, QDate date)
  More...
 
static QDataStream Read (QDataStream @in, QUrl url)
  More...
 
static QDataStream Read (QDataStream s, QUuid id)
  More...
 
static QTextStream Read (QTextStream s, Qt.FuncQTextStreamQTextStream f)
 
static QDataStream Read (QDataStream stream, QLineF line)
  More...
 
static QDataStream Read (QDataStream stream, QRectF rectangle)
  More...
 
static QDataStream Read (QDataStream stream, QPointF point)
  More...
 
static QDataStream Read (QDataStream stream, QLine line)
  More...
 
static QDataStream Read (QDataStream @in, QBitArray ba)
  More...
 
static QDataStream Read (QDataStream stream, QSize size)
  More...
 
static QDataStream Read (QDataStream @in, QDateTime dateTime)
  More...
 
static QDataStream Read (QDataStream @in, QTime time)
  More...
 
static QDataStream Read (QDataStream stream, QPoint point)
  More...
 
static QDataStream Read (QDataStream @in, QRegExp regExp)
  More...
 
static QDataStream Read (QDataStream s, object p)
 
static QDataStream Read (QDataStream @in, QByteArray ba)
  More...
 
static QDataStream Read (QDataStream stream, QSizeF size)
  More...
 
static QDataStream Read (QDataStream arg1, string arg2)
 
static QDataStream Read (QDataStream s, QVariant.Type p)
 
static QDataStream Read (QDataStream @in, System.Collections.Generic.List< string > list)
  More...
 
static double QAcos (double v)
  More...
 
static void QAddPostRoutine (System.Action ptr)
  More...
 
static double QAsin (double v)
  More...
 
static double QAtan (double v)
  More...
 
static double QAtan2 (double x, double y)
  More...
 
static void QBadAlloc ()
 
static int QCeil (double v)
  More...
 
static ushort QChecksum (string s, uint len)
  More...
 
static QByteArray QCompress (QByteArray data, int compressionLevel=-1)
  More...
 
static QByteArray QCompress (Pointer< byte > data, int nbytes, int compressionLevel=-1)
  More...
 
static double QCos (double v)
  More...
 
static double QExp (double v)
  More...
 
static double QFabs (double v)
 
static double QFastCos (double x)
 
static double QFastSin (double x)
 
static string QFlagLocation (string method)
 
static int QFloor (double v)
  More...
 
static bool QFuzzyCompare (double p1, double p2)
  More...
 
static bool QFuzzyCompare (float p1, float p2)
  More...
 
static bool QFuzzyIsNull (double d)
 
static bool QFuzzyIsNull (float f)
 
static uint QHash (QBitArray key)
  More...
 
static uint QHash (QChar key)
  More...
 
static uint QHash (QStringRef key)
 
static uint QHash (QUrl url)
  More...
 
static uint QHash (QPersistentModelIndex index)
 
static uint QHash (QByteArray key)
  More...
 
static uint QHash (QModelIndex index)
 
static uint QHash (uint key)
  More...
 
static uint QHash (char key)
  More...
 
static uint QHash (byte key)
  More...
 
static uint QHash (short key)
  More...
 
static uint QHash (NativeLong key)
  More...
 
static uint QHash (ushort key)
  More...
 
static uint QHash (long key)
  More...
 
static uint QHash (ulong key)
  More...
 
static uint QHash (int key)
  More...
 
static uint QHash (string key)
  More...
 
static uint QHash (NativeULong key)
  More...
 
static Qt.ActionQtMsgTypeString QInstallMsgHandler (Qt.ActionQtMsgTypeString handler)
  More...
 
static int QIntCast (float f)
 
static int QIntCast (double f)
 
static bool QIsFinite (double d)
 
static bool QIsFinite (float f)
 
static bool QIsInf (float f)
 
static bool QIsInf (double d)
 
static bool QIsNaN (float f)
 
static bool QIsNaN (double d)
 
static bool QIsNull (float f)
 
static bool QIsNull (double d)
 
static double QLn (double v)
  More...
 
static double QPow (double x, double y)
  More...
 
static void QRegisterStaticPluginInstanceFunction (Qt.FuncQObject function)
  More...
 
static void QRemovePostRoutine (System.Action arg1)
 
static int QRound (double d)
  More...
 
static long QRound64 (double d)
  More...
 
static double QSin (double v)
  More...
 
static double QSqrt (double v)
  More...
 
static bool QStringComparisonHelper (QStringRef s1, string s2)
 
static double QTan (double v)
  More...
 
static QByteArray QUncompress (QByteArray data)
  More...
 
static QByteArray QUncompress (Pointer< byte > data, int nbytes)
  More...
 
static void Qbswap_helper (Pointer< byte > src, Pointer< byte > dest, int size)
 
static QByteArray Qgetenv (string varName)
  More...
 
static bool Qputenv (string varName, QByteArray value)
  More...
 
static void Qsrand (uint seed)
  More...
 
static int Qstrcmp (QByteArray str1, QByteArray str2)
 
static int Qstrcmp (QByteArray str1, string str2)
 
static int Qstrcmp (string str1, QByteArray str2)
 
static int Qstrcmp (string str1, string str2)
  More...
 
static Pointer< sbyte > Qstrcpy (Pointer< sbyte > dst, string src)
  More...
 
static Pointer< sbyte > Qstrdup (string src)
  More...
 
static int Qstricmp (string str1, string str2)
  More...
 
static uint Qstrlen (string str)
  More...
 
static int Qstrncmp (string str1, string str2, uint len)
  More...
 
static Pointer< sbyte > Qstrncpy (Pointer< sbyte > dst, string src, uint len)
  More...
 
static int Qstrnicmp (string str1, string str2, uint len)
  More...
 
static uint Qstrnlen (string str, uint maxlen)
  More...
 

Protected Member Functions

 QLineEdit (System.Type dummy)
 
override void OnChangeEvent (QEvent ev)
  More...
 
override void OnContextMenuEvent (QContextMenuEvent @event)
  More...
 
new void OnCursorPositionChanged (int old, int @new)
  More...
 
override void OnDragEnterEvent (QDragEnterEvent e)
  More...
 
override void OnDragLeaveEvent (QDragLeaveEvent e)
  More...
 
override void OnDragMoveEvent (QDragMoveEvent e)
  More...
 
override void OnDropEvent (QDropEvent e)
  More...
 
new void OnEditingFinished ()
  More...
 
override void OnFocusInEvent (QFocusEvent e)
  More...
 
override void OnFocusOutEvent (QFocusEvent e)
  More...
 
new void InitStyleOption (QStyleOptionFrame option)
  More...
 
override void OnInputMethodEvent (QInputMethodEvent e)
  More...
 
override void OnKeyPressEvent (QKeyEvent @event)
  More...
 
override void OnMouseDoubleClickEvent (QMouseEvent e)
  More...
 
override void OnMouseMoveEvent (QMouseEvent e)
  More...
 
override void OnMousePressEvent (QMouseEvent e)
  More...
 
override void OnMouseReleaseEvent (QMouseEvent e)
  More...
 
override void OnPaintEvent (QPaintEvent @event)
  More...
 
new void OnReturnPressed ()
  More...
 
new void OnSelectionChanged ()
  More...
 
new void OnTextChanged (string text)
  More...
 
new void OnTextEdited (string text)
  More...
 
- Protected Member Functions inherited from QtGui.QWidget
 QWidget (System.Type dummy)
 
virtual void OnActionEvent (QActionEvent @event)
  More...
 
virtual void OnChangeEvent (QEvent @event)
  More...
 
virtual void OnCloseEvent (QCloseEvent @event)
  More...
 
new void Create ()
  More...
 
new void Create (NativeULong window, bool initializeWindow=true, bool destroyOldWindow=true)
  More...
 
new void OnCustomContextMenuRequested (QPoint pos)
  More...
 
new void Destroy (bool destroyWindow=true, bool destroySubWindows=true)
  More...
 
virtual void OnDragEnterEvent (QDragEnterEvent @event)
  More...
 
virtual void OnDragLeaveEvent (QDragLeaveEvent @event)
  More...
 
virtual void OnDragMoveEvent (QDragMoveEvent @event)
  More...
 
virtual void OnDropEvent (QDropEvent @event)
  More...
 
virtual void EnabledChange (bool arg1)
 
virtual void OnEnterEvent (QEvent @event)
  More...
 
virtual void OnFocusInEvent (QFocusEvent @event)
  More...
 
new bool FocusNextChild ()
  More...
 
virtual bool FocusNextPrevChild (bool next)
  More...
 
virtual void OnFocusOutEvent (QFocusEvent @event)
  More...
 
new bool FocusPreviousChild ()
  More...
 
virtual void FontChange (QFont arg1)
 
virtual void OnHideEvent (QHideEvent @event)
  More...
 
virtual void OnInputMethodEvent (QInputMethodEvent @event)
  More...
 
virtual void OnKeyReleaseEvent (QKeyEvent @event)
  More...
 
virtual void LanguageChange ()
  More...
 
virtual void OnLeaveEvent (QEvent @event)
  More...
 
virtual int Metric (QPaintDevice.PaintDeviceMetric m)
  More...
 
virtual void OnMouseDoubleClickEvent (QMouseEvent @event)
  More...
 
virtual void OnMouseMoveEvent (QMouseEvent @event)
  More...
 
virtual void OnMousePressEvent (QMouseEvent @event)
  More...
 
virtual void OnMouseReleaseEvent (QMouseEvent @event)
  More...
 
virtual void OnMoveEvent (QMoveEvent @event)
  More...
 
virtual void PaletteChange (QPalette arg1)
 
new void ResetInputContext ()
  More...
 
virtual void OnResizeEvent (QResizeEvent @event)
  More...
 
virtual void OnShowEvent (QShowEvent @event)
  More...
 
virtual void StyleChange (QStyle arg1)
 
virtual void OnTabletEvent (QTabletEvent @event)
  More...
 
new void UpdateMicroFocus ()
  More...
 
virtual void OnWheelEvent (QWheelEvent @event)
  More...
 
virtual void WindowActivationChange (bool arg1)
 
- Protected Member Functions inherited from QtCore.QObject
 QObject (System.Type dummy)
 
virtual void OnChildEvent (QChildEvent @event)
  More...
 
virtual void ConnectNotify (string signal)
  More...
 
virtual void OnCustomEvent (QEvent @event)
  More...
 
new void OnDestroyed (QObject obj=null)
  More...
 
virtual void DisconnectNotify (string signal)
  More...
 
new int Receivers (string signal)
  More...
 
virtual void OnTimerEvent (QTimerEvent @event)
  More...
 

Properties

Slot< System.String > TextChanged
  More...
 
Slot< System.String > TextEdited
  More...
 
Slot< System.Int32, System.Int32 > CursorPositionChanged
  More...
 
Slot ReturnPressed
  More...
 
Slot EditingFinished
  More...
 
Slot SelectionChanged
  More...
 
Slot LostFocus
  More...
 
QCompleter Completer [get, set]
  More...
 
QMargins TextMargins [get, set]
  More...
 
QValidator Validator [get, set]
  More...
 
override QSize MinimumSizeHint [get]
  More...
 
override QSize SizeHint [get]
  More...
 
QRect CursorRect [get]
  More...
 
int SelectionStart [get]
  More...
 
new string InputMask [get, set]
  More...
 
new string Text [get, set]
  More...
 
new int MaxLength [get, set]
  More...
 
new bool Frame [get, set]
  More...
 
new EchoMode echoMode [get, set]
  More...
 
new string DisplayText [get]
  More...
 
new int CursorPosition [get, set]
  More...
 
new Qt.AlignmentFlag Alignment [get, set]
  More...
 
new bool Modified [get, set]
  More...
 
new bool HasSelectedText [get]
  More...
 
new string SelectedText [get]
  More...
 
new bool DragEnabled [get, set]
  More...
 
new bool ReadOnly [get, set]
  More...
 
new bool UndoAvailable [get]
  More...
 
new bool RedoAvailable [get]
  More...
 
new bool AcceptableInput [get]
  More...
 
new string PlaceholderText [get, set]
  More...
 
new Qt.CursorMoveStyle CursorMoveStyle [get, set]
  More...
 
static new QMetaObject StaticMetaObject [get]
 
new IQLineEditSignals Emit [get]
 
- Properties inherited from QtGui.QWidget
virtual EventHandler
< QEventArgs< QActionEvent > > 
ActionEvent
  More...
 
virtual EventHandler
< QEventArgs< QEvent > > 
ChangeEvent
  More...
 
virtual EventHandler
< QEventArgs< QCloseEvent > > 
CloseEvent
  More...
 
virtual EventHandler
< QEventArgs
< QContextMenuEvent > > 
ContextMenuEvent
  More...
 
virtual EventHandler
< QEventArgs< QDragEnterEvent > > 
DragEnterEvent
  More...
 
virtual EventHandler
< QEventArgs< QDragLeaveEvent > > 
DragLeaveEvent
  More...
 
virtual EventHandler
< QEventArgs< QDragMoveEvent > > 
DragMoveEvent
  More...
 
virtual EventHandler
< QEventArgs< QDropEvent > > 
DropEvent
  More...
 
virtual EventHandler
< QEventArgs< QEvent > > 
EnterEvent
  More...
 
virtual EventHandler
< QEventArgs< QFocusEvent > > 
FocusInEvent
  More...
 
virtual EventHandler
< QEventArgs< QFocusEvent > > 
FocusOutEvent
  More...
 
virtual EventHandler
< QEventArgs< QHideEvent > > 
HideEvent
  More...
 
virtual EventHandler
< QEventArgs
< QInputMethodEvent > > 
InputMethodEvent
  More...
 
virtual EventHandler
< QEventArgs< QKeyEvent > > 
KeyPressEvent
  More...
 
virtual EventHandler
< QEventArgs< QKeyEvent > > 
KeyReleaseEvent
  More...
 
virtual EventHandler
< QEventArgs< QEvent > > 
LeaveEvent
  More...
 
virtual EventHandler
< QEventArgs< QMouseEvent > > 
MouseDoubleClickEvent
  More...
 
virtual EventHandler
< QEventArgs< QMouseEvent > > 
MouseMoveEvent
  More...
 
virtual EventHandler
< QEventArgs< QMouseEvent > > 
MousePressEvent
  More...
 
virtual EventHandler
< QEventArgs< QMouseEvent > > 
MouseReleaseEvent
  More...
 
virtual EventHandler
< QEventArgs< QMoveEvent > > 
MoveEvent
  More...
 
virtual EventHandler
< QEventArgs< QPaintEvent > > 
PaintEvent
  More...
 
virtual EventHandler
< QEventArgs< QResizeEvent > > 
ResizeEvent
  More...
 
virtual EventHandler
< QEventArgs< QShowEvent > > 
ShowEvent
  More...
 
virtual EventHandler
< QEventArgs< QTabletEvent > > 
TabletEvent
  More...
 
virtual EventHandler
< QEventArgs< QWheelEvent > > 
WheelEvent
  More...
 
Slot< QPointCustomContextMenuRequested
  More...
 
QPalette.ColorRole BackgroundRole [get, set]
  More...
 
QMargins ContentsMargins [get, set]
  More...
 
QWidget FocusProxy [get, set]
  More...
 
QPalette.ColorRole ForegroundRole [get, set]
  More...
 
QGraphicsEffect GraphicsEffect [get, set]
  More...
 
QInputContext InputContext [get, set]
  More...
 
QLayout Layout [get, set]
  More...
 
QRegion Mask [get, set]
  More...
 
QStyle Style [get, set]
  More...
 
Qt.WindowType WindowFlags [get, set]
 
string WindowRole [get, set]
  More...
 
Qt.WindowState WindowState [get, set]
  More...
 
virtual int DevType [get]
 
virtual QPaintEngine PaintEngine [get]
  More...
 
int ColorCount [get]
  More...
 
int Depth [get]
  More...
 
int HeightMM [get]
  More...
 
int LogicalDpiX [get]
  More...
 
int LogicalDpiY [get]
  More...
 
int NumColors [get]
  More...
 
bool PaintingActive [get]
  More...
 
int PhysicalDpiX [get]
  More...
 
int PhysicalDpiY [get]
  More...
 
int WidthMM [get]
  More...
 
System.Collections.Generic.List
< QAction
Actions [get]
  More...
 
QRect ContentsRect [get]
  More...
 
NativeULong EffectiveWinId [get]
  More...
 
QFontInfo FontInfo [get]
  More...
 
QFontMetrics FontMetrics [get]
  More...
 
QGraphicsProxyWidget GraphicsProxyWidget [get]
  More...
 
NativeULong InternalWinId [get]
 
bool IsEnabledToTLW [get]
  More...
 
bool IsHidden [get]
  More...
 
bool IsLeftToRight [get]
 
bool IsRightToLeft [get]
 
bool IsTopLevel [get]
  More...
 
bool IsWindow [get]
  More...
 
static QWidget KeyboardGrabber [get]
  More...
 
static QWidget MouseGrabber [get]
  More...
 
QWidget NativeParentWidget [get]
  More...
 
QWidget NextInFocusChain [get]
  More...
 
QWidget ParentWidget [get]
  More...
 
QWidget PreviousInFocusChain [get]
  More...
 
QWidget TopLevelWidget [get]
  More...
 
bool UnderMouse [get]
  More...
 
QRegion VisibleRegion [get]
  More...
 
NativeULong WinId [get]
  More...
 
QWidget Window [get]
  More...
 
Qt.WindowType WindowType [get]
  More...
 
new bool Modal [get]
  More...
 
new Qt.WindowModality WindowModality [get, set]
  More...
 
new bool Enabled [get, set]
  More...
 
new QRect Geometry [get, set]
  More...
 
new QRect FrameGeometry [get]
  More...
 
new QRect NormalGeometry [get]
  More...
 
new int X [get]
  More...
 
new int Y [get]
  More...
 
new QPoint Pos [get, set]
  More...
 
new QSize FrameSize [get]
  More...
 
new QSize Size [get, set]
  More...
 
new int Width [get]
  More...
 
new int Height [get]
  More...
 
new QRect Rect [get]
  More...
 
new QRect ChildrenRect [get]
  More...
 
new QRegion ChildrenRegion [get]
  More...
 
new QSizePolicy SizePolicy [get, set]
  More...
 
new QSize MinimumSize [get, set]
  More...
 
new QSize MaximumSize [get, set]
  More...
 
new int MinimumWidth [get, set]
  More...
 
new int MinimumHeight [get, set]
  More...
 
new int MaximumWidth [get, set]
  More...
 
new int MaximumHeight [get, set]
  More...
 
new QSize SizeIncrement [get, set]
  More...
 
new QSize BaseSize [get, set]
  More...
 
new QPalette Palette [get, set]
  More...
 
new QFont Font [get, set]
  More...
 
new QCursor Cursor [get, set]
  More...
 
new bool MouseTracking [get, set]
  More...
 
new bool IsActiveWindow [get]
  More...
 
new Qt.FocusPolicy FocusPolicy [get, set]
  More...
 
new bool Focus [get]
  More...
 
new Qt.ContextMenuPolicy ContextMenuPolicy [get, set]
  More...
 
new bool UpdatesEnabled [get, set]
  More...
 
virtual new bool Visible [get, set]
  More...
 
new bool Minimized [get]
  More...
 
new bool Maximized [get]
  More...
 
new bool FullScreen [get]
  More...
 
virtual new QSize SizeHint [get]
  More...
 
virtual new QSize MinimumSizeHint [get]
  More...
 
new bool AcceptDrops [get, set]
  More...
 
new string WindowTitle [get, set]
  More...
 
new QIcon WindowIcon [get, set]
  More...
 
new string WindowIconText [get, set]
  More...
 
new double WindowOpacity [get, set]
  More...
 
new bool WindowModified [get, set]
  More...
 
new string ToolTip [get, set]
  More...
 
new string StatusTip [get, set]
  More...
 
new string WhatsThis [get, set]
  More...
 
new string AccessibleName [get, set]
  More...
 
new string AccessibleDescription [get, set]
  More...
 
new Qt.LayoutDirection LayoutDirection [get, set]
  More...
 
new bool AutoFillBackground [get, set]
  More...
 
new string StyleSheet [get, set]
  More...
 
new QLocale Locale [get, set]
  More...
 
new string WindowFilePath [get, set]
  More...
 
new Qt.InputMethodHint InputMethodHints [get, set]
  More...
 
static new QMetaObject StaticMetaObject [get]
 
new ushort Painters [get, set]
 
new IQWidgetSignals Emit [get]
 
- Properties inherited from QtCore.QObject
virtual EventHandler
< QEventArgs< QChildEvent > > 
ChildEvent
  More...
 
virtual EventHandler
< QEventArgs< QEvent > > 
CustomEvent
  More...
 
virtual EventHandler
< QEventArgs< QEvent > > 
Event
  More...
 
virtual EventHandler
< QEventArgs< QTimerEvent > > 
TimerEvent
  More...
 
Slot< QObjectDestroyedObj
  More...
 
Slot Destroyed
  More...
 
QObject Parent [get, set]
  More...
 
System.Collections.Generic.List
< QObject
Children [get]
  More...
 
System.Collections.Generic.List
< QByteArray
DynamicPropertyNames [get]
  More...
 
bool IsWidgetType [get]
  More...
 
static uint RegisterUserData [get]
 
QObject Sender [get]
  More...
 
int SenderSignalIndex [get]
  More...
 
bool SignalsBlocked [get]
  More...
 
virtual System.IntPtr SmokeObject [get, set]
 
new string ObjectName [get, set]
  More...
 
static new QMetaObject StaticMetaObject [get]
  More...
 
static new QMetaObject StaticQtMetaObject [get]
 
new IQObjectSignals Emit [get]
 
- Properties inherited from QtCore.Qt
static string QAppName [get]
 
static double QInf [get]
 
static double QQNaN [get]
 
static double QSNaN [get]
 
static bool QSharedBuild [get]
 
static string QVersion [get]
  More...
 
static int Qrand [get]
  More...
 
- Properties inherited from QtGui.IQPaintDevice
System.Int32 ColorCount [get]
  More...
 
System.Int32 Depth [get]
  More...
 
System.Int32 DevType [get]
 
System.Int32 Height [get]
  More...
 
System.Int32 HeightMM [get]
  More...
 
System.Int32 LogicalDpiX [get]
  More...
 
System.Int32 LogicalDpiY [get]
  More...
 
System.Int32 NumColors [get]
  More...
 
QPaintEngine PaintEngine [get]
  More...
 
System.Boolean PaintingActive [get]
  More...
 
System.Int32 PhysicalDpiX [get]
  More...
 
System.Int32 PhysicalDpiY [get]
  More...
 
System.Int32 Width [get]
  More...
 
System.Int32 WidthMM [get]
  More...
 

Additional Inherited Members

- Static Public Attributes inherited from QtCore.Qt
</para > *< para > Creating QM
files suitable for use with
this[SmokeMethod("qtTrId(const
char*, int)")] static strin 
QtTrId )(string id, int n=-1)
 
- Protected Attributes inherited from QtCore.QObject
object Q_EMIT = null
 
SmokeInvocation interceptor
 
readonly List< QEventHandler > eventFilters = new List<QEventHandler>()
 

Detailed Description

The QLineEdit widget is a one-line text editor.

A line edit allows the user to enter and edit a single line of plain text with a useful collection of editing functions, including undo and redo, cut and paste, and drag and drop.

By changing the echoMode() of a line edit, it can also be used as a "write-only" field, for inputs such as passwords.

The length of the text can be constrained to maxLength(). The text can be arbitrarily constrained using a validator() or an inputMask(), or both. When switching between a validator and an input mask on the same line edit, it is best to clear the validator or input mask to prevent undefined behavior.

A related class is QTextEdit which allows multi-line, rich text editing.

You can change the text with setText() or insert(). The text is retrieved with text(); the displayed text (which may be different, see EchoMode) is retrieved with displayText(). Text can be selected with setSelection() or selectAll(), and the selection can be cut(), copy()ied and paste()d. The text can be aligned with setAlignment().

When the text changes the textChanged() signal is emitted; when the text changes other than by calling setText() the textEdited() signal is emitted; when the cursor is moved the cursorPositionChanged() signal is emitted; and when the Return or Enter key is pressed the returnPressed() signal is emitted.

When editing is finished, either because the line edit lost focus or Return/Enter is pressed the editingFinished() signal is emitted.

Note that if there is a validator set on the line edit, the returnPressed()/editingFinished() signals will only be emitted if the validator returns QValidator::Acceptable.

By default, QLineEdits have a frame as specified by the Windows and Motif style guides; you can turn it off by calling setFrame(false).

The default key bindings are described below. The line edit also provides a context menu (usually invoked by a right mouse click) that presents some of these editing options.

KeypressAction

Left Arrow Moves the cursor one character to the left.

Shift+Left Arrow Moves and selects text one character to the left.

Right Arrow Moves the cursor one character to the right.

Shift+Right Arrow Moves and selects text one character to the right.

Home Moves the cursor to the beginning of the line.

End Moves the cursor to the end of the line.

Backspace Deletes the character to the left of the cursor.

Ctrl+Backspace Deletes the word to the left of the cursor.

Delete Deletes the character to the right of the cursor.

Ctrl+Delete Deletes the word to the right of the cursor.

Ctrl+A Select all.

Ctrl+C Copies the selected text to the clipboard.

Ctrl+Insert Copies the selected text to the clipboard.

Ctrl+K Deletes to the end of the line.

Ctrl+V Pastes the clipboard text into line edit.

Shift+Insert Pastes the clipboard text into line edit.

Ctrl+X Deletes the selected text and copies it to the clipboard.

Shift+Delete Deletes the selected text and copies it to the clipboard.

Ctrl+Z Undoes the last operation.

Ctrl+Y Redoes the last undone operation.

Any other key sequence that represents a valid character, will cause the character to be inserted into the line edit.

A line edit shown in the Macintosh widget style.

A line edit shown in the Windows XP widget style.

A line edit shown in the Plastique widget style.

See also QTextEdit, QLabel, QComboBox, GUI Design Handbook: Field, Entry, and Line Edits Example.

Member Enumeration Documentation

This enum type describes how a line edit should display its contents.

See also setEchoMode() and echoMode().

Enumerator
NoEcho 

Do not display anything. This may be appropriate for passwords where even the length of the password should be kept secret.

Normal 

Display characters as they are entered. This is the default.

Password 

Display asterisks instead of the characters actually entered.

PasswordEchoOnEdit 

Display characters as they are entered while editing otherwise display asterisks.

Constructor & Destructor Documentation

QtGui.QLineEdit.QLineEdit ( System.Type  dummy)
protected
QtGui.QLineEdit.QLineEdit ( QWidget  parent = null)

Constructs a line edit with no text.

The maximum text length is set to 32767 characters.

The parent argument is sent to the QWidget constructor.

See also setText() and setMaxLength().

Here is the call graph for this function:

QtGui.QLineEdit.QLineEdit ( string  contents,
QWidget  parent = null 
)

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 argument is sent to the QWidget constructor.

See also text() and setMaxLength().

Here is the call graph for this function:

Member Function Documentation

new void QtGui.QLineEdit.Backspace ( )

If no text is selected, deletes the character to the left of the text cursor and moves the cursor one position to the left. If any text is selected, the cursor is moved to the beginning of the selected text and the selected text is deleted.

See also del().

new void QtGui.QLineEdit.Clear ( )

Clears the contents of the line edit.

See also setText() and insert().

new void QtGui.QLineEdit.Copy ( )

Copies the selected text to the clipboard, if there is any, and if echoMode() is Normal.

See also cut() and paste().

override void QtGui.QLineEdit.CreateProxy ( )
virtual

Reimplemented from QtCore.QObject.

Here is the caller graph for this function:

new QMenu QtGui.QLineEdit.CreateStandardContextMenu ( )

This function creates the standard context menu which is shown when the user clicks on the line edit with the right mouse button. It is called from the default contextMenuEvent() handler. The popup menu's ownership is transferred to the caller.

new void QtGui.QLineEdit.CursorBackward ( bool  mark,
int  steps = 1 
)

Moves the cursor back steps characters. If mark is true each character moved over is added to the selection; if mark is false the selection is cleared.

See also cursorForward().

new void QtGui.QLineEdit.CursorForward ( bool  mark,
int  steps = 1 
)

Moves the cursor forward steps characters. If mark is true each character moved over is added to the selection; if mark is false the selection is cleared.

See also cursorBackward().

new int QtGui.QLineEdit.CursorPositionAt ( QPoint  pos)

Returns the cursor position under the point pos.

new void QtGui.QLineEdit.CursorWordBackward ( bool  mark)

Moves the cursor one word backward. If mark is true, the word is also selected.

See also cursorWordForward().

new void QtGui.QLineEdit.CursorWordForward ( bool  mark)

Moves the cursor one word forward. If mark is true, the word is also selected.

See also cursorWordBackward().

new void QtGui.QLineEdit.Cut ( )

Copies the selected text to the clipboard and deletes it, if there is any, and if echoMode() is Normal.

If the current validator disallows deleting the selected text, cut() will copy without deleting.

See also copy(), paste(), and setValidator().

new void QtGui.QLineEdit.Del ( )

If no text is selected, deletes the character to the right of the text cursor. If any text is selected, the cursor is moved to the beginning of the selected text and the selected text is deleted.

See also backspace().

new void QtGui.QLineEdit.Deselect ( )

Deselects any selected text.

See also setSelection() and selectAll().

new void QtGui.QLineEdit.Dispose ( )
new void QtGui.QLineEdit.End ( bool  mark)

Moves the text cursor to the end of the line unless it is already there. If mark is true, text is selected towards the last position; otherwise, any selected text is unselected if the cursor is moved.

See also home().

new void QtGui.QLineEdit.GetTextMargins ( ref int  left,
ref int  top,
ref int  right,
ref int  bottom 
)

Returns the widget's text margins for left, top, right, and bottom.

This function was introduced in Qt 4.5.

See also setTextMargins().

new void QtGui.QLineEdit.Home ( bool  mark)

Moves the text cursor to the beginning of the line unless it is already there. If mark is true, text is selected towards the first position; otherwise, any selected text is unselected if the cursor is moved.

See also end().

new void QtGui.QLineEdit.InitStyleOption ( QStyleOptionFrame  option)
protected

Initialize option with the values from this QLineEdit. This method is useful for subclasses when they need a QStyleOptionFrame or QStyleOptionFrameV2, but don't want to fill in all the information themselves. This function will check the version of the QStyleOptionFrame and fill in the additional values for a QStyleOptionFrameV2.

See also QStyleOption::initFrom().

override object QtGui.QLineEdit.InputMethodQuery ( Qt.InputMethodQuery  property)
virtual

Reimplemented from QWidget::inputMethodQuery().

Reimplemented from QtGui.QWidget.

new void QtGui.QLineEdit.Insert ( string  newText)

Deletes any selected text, inserts newText, and validates the result. If it is valid, it sets it as the new contents of the line edit.

See also setText() and clear().

override void QtGui.QLineEdit.OnChangeEvent ( QEvent  ev)
protected

Reimplemented from QWidget::changeEvent().

override void QtGui.QLineEdit.OnContextMenuEvent ( QContextMenuEvent event)
protectedvirtual

Reimplemented from QWidget::contextMenuEvent().

Shows the standard context menu created with createStandardContextMenu().

If you do not want the line edit to have a context menu, you can set its contextMenuPolicy to Qt::NoContextMenu. If you want to customize the context menu, reimplement this function. If you want to extend the standard context menu, reimplement this function, call createStandardContextMenu() and extend the menu returned.

void LineEdit::contextMenuEvent(QContextMenuEvent *event)

{

QMenu *menu = createStandardContextMenu();

menu->addAction(tr("My Menu Item"));

//...

menu->exec(event->globalPos());

delete menu;

}

The event parameter is used to obtain the position where the mouse cursor was when the event was generated.

See also setContextMenuPolicy().

Reimplemented from QtGui.QWidget.

new void QtGui.QLineEdit.OnCursorPositionChanged ( int  old,
int @  new 
)
protected

This signal is emitted whenever the cursor moves. The previous position is given by old, and the new position by new.

See also setCursorPosition() and cursorPosition().

override void QtGui.QLineEdit.OnDragEnterEvent ( QDragEnterEvent  e)
protected

Reimplemented from QWidget::dragEnterEvent().

override void QtGui.QLineEdit.OnDragLeaveEvent ( QDragLeaveEvent  e)
protected

Reimplemented from QWidget::dragLeaveEvent().

override void QtGui.QLineEdit.OnDragMoveEvent ( QDragMoveEvent  e)
protected

Reimplemented from QWidget::dragMoveEvent().

override void QtGui.QLineEdit.OnDropEvent ( QDropEvent  e)
protected

Reimplemented from QWidget::dropEvent().

new void QtGui.QLineEdit.OnEditingFinished ( )
protected

This signal is emitted when the Return or Enter key is pressed or the line edit loses focus. Note that if there is a validator() or inputMask() set on the line edit and enter/return is pressed, the editingFinished() signal will only be emitted if the input follows the inputMask() and the validator() returns QValidator::Acceptable.

override bool QtGui.QLineEdit.OnEvent ( QEvent  e)
virtual

Reimplemented from QObject::event().

Reimplemented from QtCore.QObject.

override void QtGui.QLineEdit.OnFocusInEvent ( QFocusEvent  e)
protected

Reimplemented from QWidget::focusInEvent().

override void QtGui.QLineEdit.OnFocusOutEvent ( QFocusEvent  e)
protected

Reimplemented from QWidget::focusOutEvent().

override void QtGui.QLineEdit.OnInputMethodEvent ( QInputMethodEvent  e)
protected

Reimplemented from QWidget::inputMethodEvent().

override void QtGui.QLineEdit.OnKeyPressEvent ( QKeyEvent event)
protectedvirtual

Reimplemented from QWidget::keyPressEvent().

Converts the given key press event into a line edit action.

If Return or Enter is pressed and the current text is valid (or can be made valid by the validator), the signal returnPressed() is emitted.

The default key bindings are listed in the class's detailed description.

Reimplemented from QtGui.QWidget.

override void QtGui.QLineEdit.OnMouseDoubleClickEvent ( QMouseEvent  e)
protected

Reimplemented from QWidget::mouseDoubleClickEvent().

override void QtGui.QLineEdit.OnMouseMoveEvent ( QMouseEvent  e)
protected

Reimplemented from QWidget::mouseMoveEvent().

override void QtGui.QLineEdit.OnMousePressEvent ( QMouseEvent  e)
protected

Reimplemented from QWidget::mousePressEvent().

override void QtGui.QLineEdit.OnMouseReleaseEvent ( QMouseEvent  e)
protected

Reimplemented from QWidget::mouseReleaseEvent().

override void QtGui.QLineEdit.OnPaintEvent ( QPaintEvent event)
protectedvirtual

Reimplemented from QWidget::paintEvent().

Reimplemented from QtGui.QWidget.

new void QtGui.QLineEdit.OnReturnPressed ( )
protected

This signal is emitted when the Return or Enter key is pressed. Note that if there is a validator() or inputMask() set on the line edit, the returnPressed() signal will only be emitted if the input follows the inputMask() and the validator() returns QValidator::Acceptable.

new void QtGui.QLineEdit.OnSelectionChanged ( )
protected

This signal is emitted whenever the selection changes.

See also hasSelectedText() and selectedText().

new void QtGui.QLineEdit.OnTextChanged ( string  text)
protected

This signal is emitted whenever the text changes. The text argument is the new text.

Unlike textEdited(), this signal is also emitted when the text is changed programmatically, for example, by calling setText().

new void QtGui.QLineEdit.OnTextEdited ( string  text)
protected

This signal is emitted whenever the text is edited. The text argument is the new text.

Unlike textChanged(), this signal is not emitted when the text is changed programmatically, for example, by calling setText().

new void QtGui.QLineEdit.Paste ( )

Inserts the clipboard's text at the cursor position, deleting any selected text, providing the line edit is not read-only.

If the end result would not be acceptable to the current validator, nothing happens.

See also copy() and cut().

new void QtGui.QLineEdit.Redo ( )

Redoes the last operation if redo is available.

new void QtGui.QLineEdit.SelectAll ( )

Selects all the text (i.e. highlights it) and moves the cursor to the end. This is useful when a default value has been inserted because if the user types before clicking on the widget, the selected text will be deleted.

See also setSelection() and deselect().

new void QtGui.QLineEdit.SetSelection ( int  start,
int  length 
)

Selects text from position start and for length characters. Negative lengths are allowed.

See also deselect(), selectAll(), and selectedText().

new void QtGui.QLineEdit.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, and bottom.

See also getTextMargins().

This function was introduced in Qt 4.5.

See also textMargins().

static string QtGui.QLineEdit.Tr ( string  s,
string  c = null 
)
static
static string QtGui.QLineEdit.Tr ( string  s,
string  c,
int  n 
)
static
static string QtGui.QLineEdit.TrUtf8 ( string  s,
string  c = null 
)
static
static string QtGui.QLineEdit.TrUtf8 ( string  s,
string  c,
int  n 
)
static
new void QtGui.QLineEdit.Undo ( )

Undoes the last operation if undo is available. Deselects any current selection, and updates the selection start to the current cursor position.

Property Documentation

new bool QtGui.QLineEdit.AcceptableInput
get

This property holds whether the input satisfies the inputMask and the validator.

By default, this property is true.

new Qt.AlignmentFlag QtGui.QLineEdit.Alignment
getset

This property holds the alignment of the line edit.

Both horizontal and vertical alignment is allowed here, Qt::AlignJustify will map to Qt::AlignLeft.

By default, this property contains a combination of Qt::AlignLeft and Qt::AlignVCenter.

QCompleter QtGui.QLineEdit.Completer
getset

Returns the current QCompleter that provides completions.

This function was introduced in Qt 4.2.

Sets this line edit to provide auto completions from the completer, c. The completion mode is set using QCompleter::setCompletionMode().

To use a QCompleter with a QValidator or QLineEdit::inputMask, you need to ensure that the model provided to QCompleter contains valid entries. You can use the QSortFilterProxyModel to ensure that the QCompleter's model contains only valid entries.

If c == 0, setCompleter() removes the current completer, effectively disabling auto completion.

This function was introduced in Qt 4.2.

new Qt.CursorMoveStyle QtGui.QLineEdit.CursorMoveStyle
getset

This property holds the movement style of cursor in this line edit.

When this property is set to Qt::VisualMoveStyle, the line edit will use visual movement style. Pressing the left arrow key will always cause the cursor to move left, regardless of the text's writing direction. The same behavior applies to right arrow key.

When the property is Qt::LogicalMoveStyle (the default), within a LTR text block, increase cursor position when pressing left arrow key, decrease cursor position when pressing the right arrow key. If the text block is right to left, the opposite behavior applies.

This property was introduced in Qt 4.8.

new int QtGui.QLineEdit.CursorPosition
getset

This property holds the current cursor position for this line edit.

Setting the cursor position causes a repaint when appropriate.

By default, this property contains a value of 0.

Slot<System.Int32,System.Int32> QtGui.QLineEdit.CursorPositionChanged
addremove

This signal is emitted whenever the cursor moves. The previous position is given by old, and the new position by new.

See also setCursorPosition() and cursorPosition().

QRect QtGui.QLineEdit.CursorRect
get

Returns a rectangle that includes the lineedit cursor.

This function was introduced in Qt 4.4.

new string QtGui.QLineEdit.DisplayText
get

This property holds the displayed text.

If echoMode is Normal this returns the same as text(); if EchoMode is Password or PasswordEchoOnEdit it returns a string of asterisks text().length() characters long, e.g. "******"; if EchoMode is NoEcho returns an empty string, "".

By default, this property contains an empty string.

new bool QtGui.QLineEdit.DragEnabled
getset

This property holds whether the lineedit starts a drag if the user presses and moves the mouse on some selected text.

Dragging is disabled by default.

new EchoMode QtGui.QLineEdit.echoMode
getset

This property holds the line edit's echo mode.

The echo mode determines how the text entered in the line edit is displayed (or echoed) to the user.

The most common setting is Normal, in which the text entered by the user is displayed verbatim, but QLineEdit also supports modes that allow the entered text to be suppressed or obscured: these include NoEcho, Password and PasswordEchoOnEdit.

The widget's display and the ability to copy or drag the text is affected by this setting.

By default, this property is set to Normal.

Slot QtGui.QLineEdit.EditingFinished
addremove

This signal is emitted when the Return or Enter key is pressed or the line edit loses focus. Note that if there is a validator() or inputMask() set on the line edit and enter/return is pressed, the editingFinished() signal will only be emitted if the input follows the inputMask() and the validator() returns QValidator::Acceptable.

new IQLineEditSignals QtGui.QLineEdit.Emit
getprotected
new bool QtGui.QLineEdit.Frame
getset

This property holds whether the line edit draws itself with a frame.

If enabled (the default) the line edit draws itself inside a frame, otherwise the line edit draws itself without any frame.

new bool QtGui.QLineEdit.HasSelectedText
get

This property holds whether there is any text selected.

hasSelectedText() returns true if some or all of the text has been selected by the user; otherwise returns false.

By default, this property is false.

new string QtGui.QLineEdit.InputMask
getset

This property holds the validation input mask.

If no mask is set, inputMask() returns an empty string.

Sets the QLineEdit's validation mask. Validators can be used instead of, or in conjunction with masks; see setValidator().

Unset the mask and return to normal QLineEdit operation by passing an empty string ("") or just calling setInputMask() with no arguments.

The table below shows the characters that can be used in an input mask. A space character, the default character for a blank, is needed for cases where a character is permitted but not required.

CharacterMeaning

A ASCII alphabetic character required. A-Z, a-z.

a ASCII alphabetic character permitted but not required.

N ASCII alphanumeric character required. A-Z, a-z, 0-9.

n ASCII alphanumeric character permitted but not required.

X Any character required.

x Any character permitted but not required.

9 ASCII digit required. 0-9.

0 ASCII digit permitted but not required.

D ASCII digit required. 1-9.

d ASCII digit permitted but not required (1-9).

# ASCII digit or plus/minus sign permitted but not required.

H Hexadecimal character required. A-F, a-f, 0-9.

h Hexadecimal character permitted but not required.

B Binary character required. 0-1.

b Binary character permitted but not required.

> All following alphabetic characters are uppercased.

< All following alphabetic characters are lowercased.

! Switch off case conversion.

\ Use \ to escape the special characters listed above to use them as separators.

The mask consists of a string of mask characters and separators, optionally followed by a semicolon and the character used for blanks. The blank characters are always removed from the text after editing.

Examples:

MaskNotes

000.000.000.000;_ IP address; blanks are _.

HH:HH:HH:HH:HH:HH;_ MAC address

0000-00-00 ISO Date; blanks are space

>AAAAA-AAAAA-AAAAA-AAAAA-AAAAA;# License number; blanks are - and all (alphabetic) characters are converted to uppercase.

To get range control (e.g., for an IP address) use masks together with validators.

Slot QtGui.QLineEdit.LostFocus
addremove

This signal is emitted when the line edit has lost focus.

Use editingFinished() instead

See also editingFinished() and returnPressed().

new int QtGui.QLineEdit.MaxLength
getset

This property holds the maximum permitted length of the text.

If the text is too long, it is truncated at the limit.

If truncation occurs any selected text will be unselected, the cursor position is set to 0 and the first part of the string is shown.

If the line edit has an input mask, the mask defines the maximum string length.

By default, this property contains a value of 32767.

override QSize QtGui.QLineEdit.MinimumSizeHint
get

Reimplemented from QWidget::minimumSizeHint().

Returns a minimum size for the line edit.

The width returned is enough for at least one character.

new bool QtGui.QLineEdit.Modified
getset

This property holds whether the line edit's contents has been modified by the user.

The modified flag is never read by QLineEdit; it has a default value of false and is changed to true whenever the user changes the line edit's contents.

This is useful for things that need to provide a default value but do not start out knowing what the default should be (perhaps it depends on other fields on the form). Start the line edit without the best default, and when the default is known, if modified() returns false (the user hasn't entered any text), insert the default value.

Calling setText() resets the modified flag to false.

new string QtGui.QLineEdit.PlaceholderText
getset

This property holds the line edit's placeholder text.

Setting this property makes the line edit display a grayed-out placeholder text as long as the text() is empty and the widget doesn't have focus.

By default, this property contains an empty string.

This property was introduced in Qt 4.7.

new bool QtGui.QLineEdit.ReadOnly
getset

This property holds whether the line edit is read only.

In read-only mode, the user can still copy the text to the clipboard, or drag and drop the text (if echoMode() is Normal), but cannot edit it.

QLineEdit does not show a cursor in read-only mode.

By default, this property is false.

new bool QtGui.QLineEdit.RedoAvailable
get

This property holds whether redo is available.

Redo becomes available once the user has performed one or more undo operations on text in the line edit.

By default, this property is false.

Slot QtGui.QLineEdit.ReturnPressed
addremove

This signal is emitted when the Return or Enter key is pressed. Note that if there is a validator() or inputMask() set on the line edit, the returnPressed() signal will only be emitted if the input follows the inputMask() and the validator() returns QValidator::Acceptable.

new string QtGui.QLineEdit.SelectedText
get

This property holds the selected text.

If there is no selected text this property's value is an empty string.

By default, this property contains an empty string.

Slot QtGui.QLineEdit.SelectionChanged
addremove

This signal is emitted whenever the selection changes.

See also hasSelectedText() and selectedText().

int QtGui.QLineEdit.SelectionStart
get

selectionStart() returns the index of the first selected character in the line edit or -1 if no text is selected.

See also selectedText().

Reimplemented from QWidget::sizeHint().

Returns a recommended size for the widget.

The width returned, in pixels, is usually enough for about 15 to 20 characters.

new QMetaObject QtGui.QLineEdit.StaticMetaObject
staticget
new string QtGui.QLineEdit.Text
getset

This property holds the line edit's text.

Setting this property clears the selection, clears the undo/redo history, moves the cursor to the end of the line and resets the modified property to false. The text is not validated when inserted with setText().

The text is truncated to maxLength() length.

By default, this property contains an empty string.

Slot<System.String> QtGui.QLineEdit.TextChanged
addremove

This signal is emitted whenever the text changes. The text argument is the new text.

Unlike textEdited(), this signal is also emitted when the text is changed programmatically, for example, by calling setText().

Slot<System.String> QtGui.QLineEdit.TextEdited
addremove

This signal is emitted whenever the text is edited. The text argument is the new text.

Unlike textChanged(), this signal is not emitted when the text is changed programmatically, for example, by calling setText().

QMargins QtGui.QLineEdit.TextMargins
getset

Returns the widget's text margins.

This function was introduced in Qt 4.6.

Sets the margins around the text inside the frame.

This function was introduced in Qt 4.6.

new bool QtGui.QLineEdit.UndoAvailable
get

This property holds whether undo is available.

Undo becomes available once the user has modified the text in the line edit.

By default, this property is false.

QValidator QtGui.QLineEdit.Validator
getset

Returns a pointer to the current input validator, or 0 if no validator has been set.

Sets this line edit to only accept input that the validator, v, will accept. This allows you to place any arbitrary constraints on the text which may be entered.

If v == 0, setValidator() removes the current input validator. The initial setting is to have no input validator (i.e. any input is accepted up to maxLength()).