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

The QComboBox widget is a combined button and popup list. More...

Inheritance diagram for QtGui.QComboBox:
Collaboration diagram for QtGui.QComboBox:

Public Types

enum  InsertPolicy {
  InsertAfterCurrent = 4, InsertAlphabetically = 6, InsertAtBottom = 3, InsertAtCurrent = 2,
  InsertAtTop = 1, InsertBeforeCurrent = 5, NoInsert = 0
}
  More...
 
enum  SizeAdjustPolicy { AdjustToContents = 0, AdjustToContentsOnFirstShow = 1, AdjustToMinimumContentsLength = 2, AdjustToMinimumContentsLengthWithIcon = 3 }
  More...
 
- Public Types inherited from QtGui.QWidget
enum  RenderFlag { DrawChildren = 2, DrawWindowBackground = 1, IgnoreMask = 4 }
  More...
 

Public Member Functions

 QComboBox (QWidget parent=null)
  More...
 
override void CreateProxy ()
 
new void AddItem (QIcon icon, string text)
  More...
 
new void AddItem (QIcon icon, string text, object userData)
  More...
 
new void AddItem (string text)
  More...
 
new void AddItem (string text, object userData)
  More...
 
new void AddItems (System.Collections.Generic.List< string > texts)
  More...
 
new void Clear ()
  More...
 
new void ClearEditText ()
  More...
 
override bool OnEvent (QEvent @event)
  More...
 
new int FindData (object data, int role=(int) Qt.ItemDataRole.UserRole, Qt.MatchFlag flags=Qt.MatchFlag.MatchExactly|Qt.MatchFlag.MatchCaseSensitive)
  More...
 
new int FindText (string text, Qt.MatchFlag flags=Qt.MatchFlag.MatchExactly|Qt.MatchFlag.MatchCaseSensitive)
  More...
 
virtual void HidePopup ()
  More...
 
override object InputMethodQuery (Qt.InputMethodQuery query)
  More...
 
new void InsertItem (int index, QIcon icon, string text)
  More...
 
new void InsertItem (int index, QIcon icon, string text, object userData)
  More...
 
new void InsertItem (int index, string text)
  More...
 
new void InsertItem (int index, string text, object userData)
  More...
 
new void InsertItems (int index, System.Collections.Generic.List< string > texts)
  More...
 
new void InsertSeparator (int index)
  More...
 
new object ItemData (int index, int role=(int) Qt.ItemDataRole.UserRole)
  More...
 
new QIcon ItemIcon (int index)
  More...
 
new string ItemText (int index)
  More...
 
new void RemoveItem (int index)
  More...
 
new void SetEditText (string text)
  More...
 
new void SetItemData (int index, object value, int role=(int) Qt.ItemDataRole.UserRole)
  More...
 
new void SetItemIcon (int index, QIcon icon)
  More...
 
new void SetItemText (int index, string text)
  More...
 
virtual void ShowPopup ()
  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 OnEvent (QEvent e)
  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

 QComboBox (System.Type dummy)
 
new void OnActivated (int index)
  More...
 
new void OnActivated (string text)
  More...
 
override void OnChangeEvent (QEvent e)
  More...
 
override void OnContextMenuEvent (QContextMenuEvent e)
  More...
 
new void OnCurrentIndexChanged (int index)
  More...
 
new void OnCurrentIndexChanged (string text)
  More...
 
new void OnEditTextChanged (string text)
  More...
 
override void OnFocusInEvent (QFocusEvent e)
  More...
 
override void OnFocusOutEvent (QFocusEvent e)
  More...
 
override void OnHideEvent (QHideEvent e)
  More...
 
new void OnHighlighted (int index)
  More...
 
new void OnHighlighted (string text)
  More...
 
new void InitStyleOption (QStyleOptionComboBox option)
  More...
 
override void OnInputMethodEvent (QInputMethodEvent e)
  More...
 
override void OnKeyPressEvent (QKeyEvent e)
  More...
 
override void OnKeyReleaseEvent (QKeyEvent e)
  More...
 
override void OnMousePressEvent (QMouseEvent e)
  More...
 
override void OnMouseReleaseEvent (QMouseEvent e)
  More...
 
override void OnPaintEvent (QPaintEvent e)
  More...
 
override void OnResizeEvent (QResizeEvent e)
  More...
 
override void OnShowEvent (QShowEvent e)
  More...
 
override void OnWheelEvent (QWheelEvent e)
  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...
 
virtual void OnContextMenuEvent (QContextMenuEvent @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 OnKeyPressEvent (QKeyEvent @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 OnPaintEvent (QPaintEvent @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 > EditTextChanged
  More...
 
Slot< System.Int32 > Activated
  More...
 
Slot< System.String > ActivatedText
  More...
 
Slot< System.Int32 > Highlighted
  More...
 
Slot< System.String > HighlightedText
  More...
 
Slot< System.Int32 > CurrentIndexChanged
  More...
 
Slot< System.String > CurrentIndexChangedText
  More...
 
Slot< System.String > TextChanged
  More...
 
QCompleter Completer [get, set]
  More...
 
QAbstractItemDelegate ItemDelegate [get, set]
  More...
 
QLineEdit LineEdit [get, set]
  More...
 
QAbstractItemModel Model [get, set]
  More...
 
QModelIndex RootModelIndex [get, set]
  More...
 
QValidator Validator [get, set]
  More...
 
QAbstractItemView View [get, set]
  More...
 
override QSize MinimumSizeHint [get]
  More...
 
override QSize SizeHint [get]
  More...
 
new bool Editable [get, set]
  More...
 
new int Count [get]
  More...
 
new string CurrentText [get]
  More...
 
new int CurrentIndex [get, set]
  More...
 
new int MaxVisibleItems [get, set]
  More...
 
new int MaxCount [get, set]
  More...
 
new InsertPolicy insertPolicy [get, set]
  More...
 
new SizeAdjustPolicy sizeAdjustPolicy [get, set]
  More...
 
new int MinimumContentsLength [get, set]
  More...
 
new QSize IconSize [get, set]
  More...
 
new bool AutoCompletion [get, set]
  More...
 
new Qt.CaseSensitivity AutoCompletionCaseSensitivity [get, set]
  More...
 
new bool DuplicatesEnabled [get, set]
  More...
 
new bool Frame [get, set]
  More...
 
new int ModelColumn [get, set]
  More...
 
static new QMetaObject StaticMetaObject [get]
 
new IQComboBoxSignals 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 QComboBox widget is a combined button and popup list.

A QComboBox provides a means of presenting a list of options to the user in a way that takes up the minimum amount of screen space.

A combobox is a selection widget that displays the current item, and can pop up a list of selectable items. A combobox may be editable, allowing the user to modify each item in the list.

Comboboxes can contain pixmaps as well as strings; the insertItem() and setItemText() functions are suitably overloaded. For editable comboboxes, the function clearEditText() is provided, to clear the displayed string without changing the combobox's contents.

There are two signals emitted if the current item of a combobox changes, currentIndexChanged() and activated(). currentIndexChanged() is always emitted regardless if the change was done programmatically or by user interaction, while activated() is only emitted when the change is caused by user interaction. The highlighted() signal is emitted when the user highlights an item in the combobox popup list. All three signals exist in two versions, one with a QString argument and one with an int argument. If the user selects or highlights a pixmap, only the int signals are emitted. Whenever the text of an editable combobox is changed the editTextChanged() signal is emitted.

When the user enters a new string in an editable combobox, the widget may or may not insert it, and it can insert it in several locations. The default policy is is AtBottom but you can change this using setInsertPolicy().

It is possible to constrain the input to an editable combobox using QValidator; see setValidator(). By default, any input is accepted.

A combobox can be populated using the insert functions, insertItem() and insertItems() for example. Items can be changed with setItemText(). An item can be removed with removeItem() and all items can be removed with clear(). The text of the current item is returned by currentText(), and the text of a numbered item is returned with text(). The current item can be set with setCurrentIndex(). The number of items in the combobox is returned by count(); the maximum number of items can be set with setMaxCount(). You can allow editing using setEditable(). For editable comboboxes you can set auto-completion using setCompleter() and whether or not the user can add duplicates is set with setDuplicatesEnabled().

QComboBox uses the model/view framework for its popup list and to store its items. By default a QStandardItemModel stores the items and a QListView subclass displays the popuplist. You can access the model and view directly (with model() and view()), but QComboBox also provides functions to set and get item data (e.g., setItemData() and itemText()). You can also set a new model and view (with setModel() and setView()). For the text and icon in the combobox label, the data in the model that has the Qt::DisplayRole and Qt::DecorationRole is used. Note that you cannot alter the SelectionMode of the view(), e.g., by using setSelectionMode().

See also QLineEdit, QSpinBox, QRadioButton, QButtonGroup, and GUI Design Handbook: Combo Box, Drop-Down List Box.

Member Enumeration Documentation

This enum specifies what the QComboBox should do when a new string is entered by the user.

Enumerator
InsertAfterCurrent 

The string is inserted after the current item in the combobox.

InsertAlphabetically 

The string is inserted in the alphabetic order in the combobox.

InsertAtBottom 

The string will be inserted after the last item in the combobox.

InsertAtCurrent 

The current item will be replaced by the string.

InsertAtTop 

The string will be inserted as the first item in the combobox.

InsertBeforeCurrent 

The string is inserted before the current item in the combobox.

NoInsert 

The string will not be inserted into the combobox.

This enum specifies how the size hint of the QComboBox should adjust when new content is added or content changes.

Enumerator
AdjustToContents 

The combobox will always adjust to the contents

AdjustToContentsOnFirstShow 

The combobox will adjust to its contents the first time it is shown.

AdjustToMinimumContentsLength 

Use AdjustToContents or AdjustToContentsOnFirstShow instead.

AdjustToMinimumContentsLengthWithIcon 

The combobox will adjust to minimumContentsLength plus space for an icon. For performance reasons use this policy on large models.

Constructor & Destructor Documentation

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

Constructs a combobox with the given parent, using the default model QStandardItemModel.

Here is the call graph for this function:

Member Function Documentation

new void QtGui.QComboBox.AddItem ( QIcon  icon,
string  text 
)

Adds an item to the combobox with the given icon and text, and containing the specified userData (stored in the Qt::UserRole). The item is appended to the list of existing items.

new void QtGui.QComboBox.AddItem ( QIcon  icon,
string  text,
object  userData 
)

Adds an item to the combobox with the given icon and text, and containing the specified userData (stored in the Qt::UserRole). The item is appended to the list of existing items.

new void QtGui.QComboBox.AddItem ( string  text)

Adds an item to the combobox with the given text, and containing the specified userData (stored in the Qt::UserRole). The item is appended to the list of existing items.

new void QtGui.QComboBox.AddItem ( string  text,
object  userData 
)

Adds an item to the combobox with the given text, and containing the specified userData (stored in the Qt::UserRole). The item is appended to the list of existing items.

new void QtGui.QComboBox.AddItems ( System.Collections.Generic.List< string >  texts)

Adds each of the strings in the given texts to the combobox. Each item is appended to the list of existing items in turn.

new void QtGui.QComboBox.Clear ( )

Clears the combobox, removing all items.

Note: If you have set an external model on the combobox this model will still be cleared when calling this function.

new void QtGui.QComboBox.ClearEditText ( )

Clears the contents of the line edit used for editing in the combobox.

override void QtGui.QComboBox.CreateProxy ( )
virtual

Reimplemented from QtCore.QObject.

Reimplemented in QtGui.QFontComboBox.

Here is the caller graph for this function:

new void QtGui.QComboBox.Dispose ( )
new int QtGui.QComboBox.FindData ( object  data,
int  role = (int) Qt.ItemDataRole.UserRole,
Qt.MatchFlag  flags = Qt.MatchFlag.MatchExactly|Qt.MatchFlag.MatchCaseSensitive 
)

Returns the index of the item containing the given data for the given role; otherwise returns -1.

The flags specify how the items in the combobox are searched.

new int QtGui.QComboBox.FindText ( string  text,
Qt.MatchFlag  flags = Qt.MatchFlag.MatchExactly|Qt.MatchFlag.MatchCaseSensitive 
)

Returns the index of the item containing the given text; otherwise returns -1.

The flags specify how the items in the combobox are searched.

virtual void QtGui.QComboBox.HidePopup ( )
virtual

Hides the list of items in the combobox if it is currently visible and resets the internal state, so that if the custom pop-up was shown inside the reimplemented showPopup(), then you also need to reimplement the hidePopup() function to hide your custom pop-up and call the base class implementation to reset the internal state whenever your custom pop-up widget is hidden.

See also showPopup().

new void QtGui.QComboBox.InitStyleOption ( QStyleOptionComboBox  option)
protected

Initialize option with the values from this QComboBox. This method is useful for subclasses when they need a QStyleOptionComboBox, but don't want to fill in all the information themselves.

See also QStyleOption::initFrom().

override object QtGui.QComboBox.InputMethodQuery ( Qt.InputMethodQuery  query)
virtual

Reimplemented from QWidget::inputMethodQuery().

Reimplemented from QtGui.QWidget.

new void QtGui.QComboBox.InsertItem ( int  index,
QIcon  icon,
string  text 
)

Inserts the icon, text and userData (stored in the Qt::UserRole) into the combobox at the given index.

If the index is equal to or higher than the total number of items, the new item is appended to the list of existing items. If the index is zero or negative, the new item is prepended to the list of existing items.

See also insertItems().

new void QtGui.QComboBox.InsertItem ( int  index,
QIcon  icon,
string  text,
object  userData 
)

Inserts the icon, text and userData (stored in the Qt::UserRole) into the combobox at the given index.

If the index is equal to or higher than the total number of items, the new item is appended to the list of existing items. If the index is zero or negative, the new item is prepended to the list of existing items.

See also insertItems().

new void QtGui.QComboBox.InsertItem ( int  index,
string  text 
)

Inserts the text and userData (stored in the Qt::UserRole) into the combobox at the given index.

If the index is equal to or higher than the total number of items, the new item is appended to the list of existing items. If the index is zero or negative, the new item is prepended to the list of existing items.

See also insertItems().

new void QtGui.QComboBox.InsertItem ( int  index,
string  text,
object  userData 
)

Inserts the text and userData (stored in the Qt::UserRole) into the combobox at the given index.

If the index is equal to or higher than the total number of items, the new item is appended to the list of existing items. If the index is zero or negative, the new item is prepended to the list of existing items.

See also insertItems().

new void QtGui.QComboBox.InsertItems ( int  index,
System.Collections.Generic.List< string >  texts 
)

Inserts the strings from the list into the combobox as separate items, starting at the index specified.

If the index is equal to or higher than the total number of items, the new items are appended to the list of existing items. If the index is zero or negative, the new items are prepended to the list of existing items.

See also insertItem().

new void QtGui.QComboBox.InsertSeparator ( int  index)

Inserts a separator item into the combobox at the given index.

If the index is equal to or higher than the total number of items, the new item is appended to the list of existing items. If the index is zero or negative, the new item is prepended to the list of existing items.

This function was introduced in Qt 4.4.

See also insertItem().

new object QtGui.QComboBox.ItemData ( int  index,
int  role = (int) Qt.ItemDataRole.UserRole 
)

Returns the data for the given role in the given index in the combobox, or QVariant::Invalid if there is no data for this role.

See also setItemData().

new QIcon QtGui.QComboBox.ItemIcon ( int  index)

Returns the icon for the given index in the combobox.

See also setItemIcon().

new string QtGui.QComboBox.ItemText ( int  index)

Returns the text for the given index in the combobox.

See also setItemText().

new void QtGui.QComboBox.OnActivated ( int  index)
protected

This signal is sent when the user chooses an item in the combobox. The item's index is passed. Note that this signal is sent even when the choice is not changed. If you need to know when the choice actually changes, use signal currentIndexChanged().

new void QtGui.QComboBox.OnActivated ( string  text)
protected

This signal is sent when the user chooses an item in the combobox. The item's text is passed. Note that this signal is sent even when the choice is not changed. If you need to know when the choice actually changes, use signal currentIndexChanged().

override void QtGui.QComboBox.OnChangeEvent ( QEvent  e)
protected

Reimplemented from QWidget::changeEvent().

override void QtGui.QComboBox.OnContextMenuEvent ( QContextMenuEvent  e)
protected

Reimplemented from QWidget::contextMenuEvent().

new void QtGui.QComboBox.OnCurrentIndexChanged ( int  index)
protected

This signal is sent whenever the currentIndex in the combobox changes either through user interaction or programmatically. The item's index is passed or -1 if the combobox becomes empty or the currentIndex was reset.

This function was introduced in Qt 4.1.

new void QtGui.QComboBox.OnCurrentIndexChanged ( string  text)
protected

This signal is sent whenever the currentIndex in the combobox changes either through user interaction or programmatically. The item's text is passed.

This function was introduced in Qt 4.1.

new void QtGui.QComboBox.OnEditTextChanged ( string  text)
protected

This signal is emitted when the text in the combobox's line edit widget is changed. The new text is specified by text.

override bool QtGui.QComboBox.OnEvent ( QEvent event)

Reimplemented from QObject::event().

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

Reimplemented from QWidget::focusInEvent().

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

Reimplemented from QWidget::focusOutEvent().

override void QtGui.QComboBox.OnHideEvent ( QHideEvent  e)
protected

Reimplemented from QWidget::hideEvent().

new void QtGui.QComboBox.OnHighlighted ( int  index)
protected

This signal is sent when an item in the combobox popup list is highlighted by the user. The item's index is passed.

new void QtGui.QComboBox.OnHighlighted ( string  text)
protected

This signal is sent when an item in the combobox popup list is highlighted by the user. The item's text is passed.

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

Reimplemented from QWidget::inputMethodEvent().

override void QtGui.QComboBox.OnKeyPressEvent ( QKeyEvent  e)
protected

Reimplemented from QWidget::keyPressEvent().

override void QtGui.QComboBox.OnKeyReleaseEvent ( QKeyEvent  e)
protected

Reimplemented from QWidget::keyReleaseEvent().

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

Reimplemented from QWidget::mousePressEvent().

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

Reimplemented from QWidget::mouseReleaseEvent().

override void QtGui.QComboBox.OnPaintEvent ( QPaintEvent  e)
protected

Reimplemented from QWidget::paintEvent().

override void QtGui.QComboBox.OnResizeEvent ( QResizeEvent  e)
protected

Reimplemented from QWidget::resizeEvent().

override void QtGui.QComboBox.OnShowEvent ( QShowEvent  e)
protected

Reimplemented from QWidget::showEvent().

override void QtGui.QComboBox.OnWheelEvent ( QWheelEvent  e)
protected

Reimplemented from QWidget::wheelEvent().

new void QtGui.QComboBox.RemoveItem ( int  index)

Removes the item at the given index from the combobox. This will update the current index if the index is removed.

This function does nothing if index is out of range.

new void QtGui.QComboBox.SetEditText ( string  text)

Sets the text in the combobox's text edit.

new void QtGui.QComboBox.SetItemData ( int  index,
object  value,
int  role = (int) Qt.ItemDataRole.UserRole 
)

Sets the data role for the item on the given index in the combobox to the specified value.

See also itemData().

new void QtGui.QComboBox.SetItemIcon ( int  index,
QIcon  icon 
)

Sets the icon for the item on the given index in the combobox.

See also itemIcon().

new void QtGui.QComboBox.SetItemText ( int  index,
string  text 
)

Sets the text for the item on the given index in the combobox.

See also itemText().

virtual void QtGui.QComboBox.ShowPopup ( )
virtual

Displays the list of items in the combobox. If the list is empty then the no items will be shown.

If you reimplement this function to show a custom pop-up, make sure you call hidePopup() to reset the internal state.

See also hidePopup().

static string QtGui.QComboBox.Tr ( string  s,
string  c = null 
)
static
static string QtGui.QComboBox.Tr ( string  s,
string  c,
int  n 
)
static
static string QtGui.QComboBox.TrUtf8 ( string  s,
string  c = null 
)
static
static string QtGui.QComboBox.TrUtf8 ( string  s,
string  c,
int  n 
)
static

Property Documentation

Slot<System.Int32> QtGui.QComboBox.Activated
addremove

This signal is sent when the user chooses an item in the combobox. The item's index is passed. Note that this signal is sent even when the choice is not changed. If you need to know when the choice actually changes, use signal currentIndexChanged().

Slot<System.String> QtGui.QComboBox.ActivatedText
addremove

This signal is sent when the user chooses an item in the combobox. The item's text is passed. Note that this signal is sent even when the choice is not changed. If you need to know when the choice actually changes, use signal currentIndexChanged().

new bool QtGui.QComboBox.AutoCompletion
getset

This property holds whether the combobox provides auto-completion for editable items.

Use setCompleter() instead.

By default, this property is true.

This property was introduced in Qt 4.1.

new Qt.CaseSensitivity QtGui.QComboBox.AutoCompletionCaseSensitivity
getset

This property holds whether string comparisons are case-sensitive or case-insensitive for auto-completion.

By default, this property is Qt::CaseInsensitive.

Use setCompleter() instead. Case sensitivity of the auto completion can be changed using QCompleter::setCaseSensitivity().

QCompleter QtGui.QComboBox.Completer
getset

Returns the completer that is used to auto complete text input for the combobox.

This function was introduced in Qt 4.2.

Sets the completer to use instead of the current completer. If completer is 0, auto completion is disabled.

By default, for an editable combo box, a QCompleter that performs case insensitive inline completion is automatically created.

This function was introduced in Qt 4.2.

new int QtGui.QComboBox.Count
get

This property holds the number of items in the combobox.

By default, for an empty combo box, this property has a value of 0.

new int QtGui.QComboBox.CurrentIndex
getset

This property holds the index of the current item in the combobox.

The current index can change when inserting or removing items.

By default, for an empty combo box or a combo box in which no current item is set, this property has a value of -1.

Slot<System.Int32> QtGui.QComboBox.CurrentIndexChanged
addremove

This signal is sent whenever the currentIndex in the combobox changes either through user interaction or programmatically. The item's index is passed or -1 if the combobox becomes empty or the currentIndex was reset.

This function was introduced in Qt 4.1.

Slot<System.String> QtGui.QComboBox.CurrentIndexChangedText
addremove

This signal is sent whenever the currentIndex in the combobox changes either through user interaction or programmatically. The item's text is passed.

This function was introduced in Qt 4.1.

new string QtGui.QComboBox.CurrentText
get

This property holds the current text.

If the combo box is editable, the current text is the value displayed by the line edit. Otherwise, it is the value of the current item or an empty string if the combo box is empty or no current item is set.

new bool QtGui.QComboBox.DuplicatesEnabled
getset

This property holds whether the user can enter duplicate items into the combobox.

Note that it is always possible to programmatically insert duplicate items into the combobox.

By default, this property is false (duplicates are not allowed).

new bool QtGui.QComboBox.Editable
getset

This property holds whether the combo box can be edited by the user.

By default, this property is false. The effect of editing depends on the insert policy.

Slot<System.String> QtGui.QComboBox.EditTextChanged
addremove

This signal is emitted when the text in the combobox's line edit widget is changed. The new text is specified by text.

new IQComboBoxSignals QtGui.QComboBox.Emit
getprotected
new bool QtGui.QComboBox.Frame
getset

This property holds whether the combo box draws itself with a frame.

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

Slot<System.Int32> QtGui.QComboBox.Highlighted
addremove

This signal is sent when an item in the combobox popup list is highlighted by the user. The item's index is passed.

Slot<System.String> QtGui.QComboBox.HighlightedText
addremove

This signal is sent when an item in the combobox popup list is highlighted by the user. The item's text is passed.

new QSize QtGui.QComboBox.IconSize
getset

This property holds the size of the icons shown in the combobox.

Unless explicitly set this returns the default value of the current style. This size is the maximum size that icons can have; icons of smaller size are not scaled up.

new InsertPolicy QtGui.QComboBox.insertPolicy
getset

This property holds the policy used to determine where user-inserted items should appear in the combobox.

The default value is AtBottom, indicating that new items will appear at the bottom of the list of items.

QAbstractItemDelegate QtGui.QComboBox.ItemDelegate
getset

Returns the item delegate used by the popup list view.

Sets the item delegate for the popup list view. The combobox takes ownership of the delegate.

Warning: You should not share the same instance of a delegate between comboboxes, widget mappers or views. Doing so can cause incorrect or unintuitive editing behavior since each view connected to a given delegate may receive the closeEditor() signal, and attempt to access, modify or close an editor that has already been closed.

QLineEdit QtGui.QComboBox.LineEdit
getset

Returns the line edit used to edit items in the combobox, or 0 if there is no line edit.

Only editable combo boxes have a line edit.

Sets the line edit to use instead of the current line edit widget.

The combo box takes ownership of the line edit.

new int QtGui.QComboBox.MaxCount
getset

This property holds the maximum number of items allowed in the combobox.

Note: If you set the maximum number to be less then the current amount of items in the combobox, the extra items will be truncated. This also applies if you have set an external model on the combobox.

By default, this property's value is derived from the highest signed integer available (typically 2147483647).

new int QtGui.QComboBox.MaxVisibleItems
getset

This property holds the maximum allowed size on screen of the combo box, measured in items.

By default, this property has a value of 10.

Note: This property is ignored for non-editable comboboxes in styles that returns true for QStyle::SH_ComboBox_Popup such as the Mac style or the Gtk+ Style.

new int QtGui.QComboBox.MinimumContentsLength
getset

This property holds the minimum number of characters that should fit into the combobox.

The default value is 0.

If this property is set to a positive value, the minimumSizeHint() and sizeHint() take it into account.

override QSize QtGui.QComboBox.MinimumSizeHint
get

Reimplemented from QWidget::minimumSizeHint().

QAbstractItemModel QtGui.QComboBox.Model
getset

Returns the model used by the combobox.

Sets the model to be model. model must not be 0. If you want to clear the contents of a model, call clear().

new int QtGui.QComboBox.ModelColumn
getset

This property holds the column in the model that is visible.

If set prior to populating the combo box, the pop-up view will not be affected and will show the first column (using this property's default value).

By default, this property has a value of 0.

QModelIndex QtGui.QComboBox.RootModelIndex
getset

Returns the root model item index for the items in the combobox.

Sets the root model item index for the items in the combobox.

new SizeAdjustPolicy QtGui.QComboBox.sizeAdjustPolicy
getset

This property holds the policy describing how the size of the combobox changes when the content changes.

The default value is AdjustToContentsOnFirstShow.

Reimplemented from QWidget::sizeHint().

This implementation caches the size hint to avoid resizing when the contents change dynamically. To invalidate the cached value change the sizeAdjustPolicy.

new QMetaObject QtGui.QComboBox.StaticMetaObject
staticget
Slot<System.String> QtGui.QComboBox.TextChanged
addremove

Use the editTextChanged(const QString &text) signal instead.

QValidator QtGui.QComboBox.Validator
getset

Returns the validator that is used to constrain text input for the combobox.

Sets the validator to use instead of the current validator.

QAbstractItemView QtGui.QComboBox.View
getset

Returns the list view used for the combobox popup.

Sets the view to be used in the combobox popup to the given itemView. The combobox takes ownership of the view.

Note: If you want to use the convenience views (like QListWidget, QTableWidget or QTreeWidget), make sure to call setModel() on the combobox with the convenience widgets model before calling this function.