Qyoto
4.0.7
Qyoto is a C# language binding for Qt
|
The QListWidget class provides an item-based list widget. More...
Public Member Functions | |
QListWidget (QWidget parent=null) | |
More... | |
override void | CreateProxy () |
new void | AddItem (QListWidgetItem item) |
More... | |
new void | AddItem (string label) |
More... | |
new void | AddItems (System.Collections.Generic.List< string > labels) |
More... | |
new void | Clear () |
More... | |
new void | ClosePersistentEditor (QListWidgetItem item) |
More... | |
new void | EditItem (QListWidgetItem item) |
More... | |
override bool | OnEvent (QEvent e) |
More... | |
new System.Collections.Generic.List < QListWidgetItem > | FindItems (string text, Qt.MatchFlag flags) |
More... | |
new void | InsertItem (int row, QListWidgetItem item) |
More... | |
new void | InsertItem (int row, string label) |
More... | |
new void | InsertItems (int row, System.Collections.Generic.List< string > labels) |
More... | |
new bool | IsItemHidden (QListWidgetItem item) |
More... | |
new bool | IsItemSelected (QListWidgetItem item) |
More... | |
new QListWidgetItem | Item (int row) |
More... | |
new QListWidgetItem | ItemAt (QPoint p) |
More... | |
new QListWidgetItem | ItemAt (int x, int y) |
More... | |
new QWidget | ItemWidget (QListWidgetItem item) |
More... | |
new void | OpenPersistentEditor (QListWidgetItem item) |
More... | |
new void | RemoveItemWidget (QListWidgetItem item) |
More... | |
new int | Row (QListWidgetItem item) |
More... | |
new void | ScrollToItem (QListWidgetItem item, QAbstractItemView.ScrollHint hint=QAbstractItemView.ScrollHint.EnsureVisible) |
More... | |
new void | SetCurrentItem (QListWidgetItem item, QItemSelectionModel.SelectionFlag command) |
More... | |
new void | SetCurrentRow (int row, QItemSelectionModel.SelectionFlag command) |
new void | SetItemHidden (QListWidgetItem item, bool hide) |
More... | |
new void | SetItemSelected (QListWidgetItem item, bool select) |
More... | |
new void | SetItemWidget (QListWidgetItem item, QWidget widget) |
More... | |
new void | SortItems (Qt.SortOrder order=Qt.SortOrder.AscendingOrder) |
More... | |
new QListWidgetItem | TakeItem (int row) |
More... | |
new QRect | VisualItemRect (QListWidgetItem item) |
More... | |
new void | Dispose () |
![]() | |
QListView (QWidget parent=null) | |
More... | |
new void | ClearPropertyFlags () |
More... | |
override void | DoItemsLayout () |
override QModelIndex | IndexAt (QPoint p) |
More... | |
new bool | IsRowHidden (int row) |
More... | |
override void | Reset () |
More... | |
override void | ScrollTo (QModelIndex index, QAbstractItemView.ScrollHint hint=QAbstractItemView.ScrollHint.EnsureVisible) |
More... | |
new void | SetRowHidden (int row, bool hide) |
More... | |
override QRect | VisualRect (QModelIndex index) |
More... | |
new void | Dispose () |
![]() | |
QAbstractItemView (QWidget parent=null) | |
More... | |
new void | ClearSelection () |
More... | |
new void | ClosePersistentEditor (QModelIndex index) |
More... | |
new void | Edit (QModelIndex index) |
More... | |
override bool | OnEvent (QEvent @event) |
More... | |
new QWidget | IndexWidget (QModelIndex index) |
More... | |
override object | InputMethodQuery (Qt.InputMethodQuery query) |
More... | |
new QAbstractItemDelegate | ItemDelegate () |
More... | |
new QAbstractItemDelegate | ItemDelegate (QModelIndex index) |
More... | |
new QAbstractItemDelegate | ItemDelegateForColumn (int column) |
More... | |
new QAbstractItemDelegate | ItemDelegateForRow (int row) |
More... | |
virtual void | KeyboardSearch (string search) |
More... | |
new void | OpenPersistentEditor (QModelIndex index) |
More... | |
new void | ScrollToBottom () |
More... | |
new void | ScrollToTop () |
More... | |
virtual void | SelectAll () |
More... | |
new void | SetIndexWidget (QModelIndex index, QWidget widget) |
More... | |
new void | SetItemDelegate (QAbstractItemDelegate @delegate) |
More... | |
new void | SetItemDelegateForColumn (int column, QAbstractItemDelegate @delegate) |
More... | |
new void | SetItemDelegateForRow (int row, QAbstractItemDelegate @delegate) |
More... | |
virtual int | SizeHintForColumn (int column) |
More... | |
new QSize | SizeHintForIndex (QModelIndex index) |
More... | |
virtual int | SizeHintForRow (int row) |
More... | |
new void | Update (QModelIndex index) |
More... | |
new void | Dispose () |
![]() | |
QAbstractScrollArea (QWidget parent=null) | |
More... | |
new void | AddScrollBarWidget (QWidget widget, Qt.AlignmentFlag alignment) |
More... | |
override bool | OnEvent (QEvent @event) |
More... | |
new System.Collections.Generic.List < QWidget > | ScrollBarWidgets (Qt.AlignmentFlag alignment) |
More... | |
new void | Dispose () |
![]() | |
QFrame (QWidget parent=null, Qt.WindowType f=0) | |
More... | |
new void | Dispose () |
![]() | |
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 () |
![]() | |
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 () |
![]() | |
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 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 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 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 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 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 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 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... | |
Additional Inherited Members | |
![]() | |
enum | Flow { LeftToRight = 0, TopToBottom = 1 } |
enum | LayoutMode { Batched = 1, SinglePass = 0 } |
More... | |
enum | Movement { Free = 1, Snap = 2, Static = 0 } |
enum | ResizeMode { Adjust = 1, Fixed = 0 } |
enum | ViewMode { IconMode = 1, ListMode = 0 } |
![]() | |
</para > *< para > Creating QM files suitable for use with this[SmokeMethod("qtTrId(const char*, int)")] static strin | QtTrId )(string id, int n=-1) |
![]() | |
object | Q_EMIT = null |
SmokeInvocation | interceptor |
readonly List< QEventHandler > | eventFilters = new List<QEventHandler>() |
The QListWidget class provides an item-based list widget.
QListWidget is a convenience class that provides a list view similar to the one supplied by QListView, but with a classic item-based interface for adding and removing items. QListWidget uses an internal model to manage each QListWidgetItem in the list.
For a more flexible list view widget, use the QListView class with a standard model.
List widgets are constructed in the same way as other widgets:
QListWidget *listWidget = new QListWidget(this);
The selectionMode() of a list widget determines how many of the items in the list can be selected at the same time, and whether complex selections of items can be created. This can be set with the setSelectionMode() function.
There are two ways to add items to the list: they can be constructed with the list widget as their parent widget, or they can be constructed with no parent widget and added to the list later. If a list widget already exists when the items are constructed, the first method is easier to use:
new QListWidgetItem(tr("Oak"), listWidget);
new QListWidgetItem(tr("Fir"), listWidget);
new QListWidgetItem(tr("Pine"), listWidget);
If you need to insert a new item into the list at a particular position, then it should be constructed without a parent widget. The insertItem() function should then be used to place it within the list. The list widget will take ownership of the item.
QListWidgetItem *newItem = new QListWidgetItem;
newItem->setText(itemText);
listWidget->insertItem(row, newItem);
For multiple items, insertItems() can be used instead. The number of items in the list is found with the count() function. To remove items from the list, use takeItem().
The current item in the list can be found with currentItem(), and changed with setCurrentItem(). The user can also change the current item by navigating with the keyboard or clicking on a different item. When the current item changes, the currentItemChanged() signal is emitted with the new current item and the item that was previously current.
A Windows XP style list widget. A Macintosh style list widget. A Plastique style list widget.
See also QListWidgetItem, QListView, QTreeView, Model/View Programming, and Config Dialog Example.
|
protected |
QtGui.QListWidget.QListWidget | ( | QWidget | parent = null | ) |
new void QtGui.QListWidget.AddItem | ( | QListWidgetItem | item | ) |
Inserts the item at the end of the list widget.
Warning: A QListWidgetItem can only be added to a QListWidget once. Adding the same QListWidgetItem multiple times to a QListWidget will result in undefined behavior.
See also insertItem().
new void QtGui.QListWidget.AddItem | ( | string | label | ) |
Inserts an item with the text label at the end of the list widget.
new void QtGui.QListWidget.AddItems | ( | System.Collections.Generic.List< string > | labels | ) |
Inserts items with the text labels at the end of the list widget.
See also insertItems().
new void QtGui.QListWidget.Clear | ( | ) |
Removes all items and selections in the view.
Warning: All items will be permanently deleted.
new void QtGui.QListWidget.ClosePersistentEditor | ( | QListWidgetItem | item | ) |
Closes the persistent editor for the given item.
See also openPersistentEditor().
|
virtual |
new void QtGui.QListWidget.Dispose | ( | ) |
|
protectedvirtual |
Handles data supplied by an external drag and drop operation that ended with the given action in the given index. Returns true if data and action can be handled by the model; otherwise returns false.
See also supportedDropActions().
new void QtGui.QListWidget.EditItem | ( | QListWidgetItem | item | ) |
Starts editing the item if it is editable.
new System.Collections.Generic.List<QListWidgetItem> QtGui.QListWidget.FindItems | ( | string | text, |
Qt.MatchFlag | flags | ||
) |
Finds items with the text that matches the string text using the given flags.
|
protected |
Returns the QModelIndex assocated with the given item.
new void QtGui.QListWidget.InsertItem | ( | int | row, |
QListWidgetItem | item | ||
) |
Inserts the item at the position in the list given by row.
See also addItem().
new void QtGui.QListWidget.InsertItem | ( | int | row, |
string | label | ||
) |
Inserts an item with the text label in the list widget at the position given by row.
See also addItem().
new void QtGui.QListWidget.InsertItems | ( | int | row, |
System.Collections.Generic.List< string > | labels | ||
) |
Inserts items from the list of labels into the list, starting at the given row.
See also insertItem() and addItem().
new bool QtGui.QListWidget.IsItemHidden | ( | QListWidgetItem | item | ) |
Returns true if the item is explicitly hidden; otherwise returns false.
This function is deprecated. Use QListWidgetItem::isHidden() instead.
new bool QtGui.QListWidget.IsItemSelected | ( | QListWidgetItem | item | ) |
Returns true if item is selected; otherwise returns false.
This function is deprecated. Use QListWidgetItem::isSelected() instead.
new QListWidgetItem QtGui.QListWidget.Item | ( | int | row | ) |
Returns the item that occupies the given row in the list if one has been set; otherwise returns 0.
See also row().
new QListWidgetItem QtGui.QListWidget.ItemAt | ( | QPoint | p | ) |
Returns a pointer to the item at the coordinates p. The coordinates are relative to the list widget's viewport().
new QListWidgetItem QtGui.QListWidget.ItemAt | ( | int | x, |
int | y | ||
) |
This is an overloaded function.
Returns a pointer to the item at the coordinates (x, y). The coordinates are relative to the list widget's viewport().
|
protected |
Returns a pointer to the QListWidgetItem assocated with the given index.
|
protected |
Returns a list of pointers to the items contained in the data object. If the object was not created by a QListWidget in the same process, the list is empty.
new QWidget QtGui.QListWidget.ItemWidget | ( | QListWidgetItem | item | ) |
Returns the widget displayed in the given item.
This function was introduced in Qt 4.1.
See also setItemWidget().
|
protectedvirtual |
Returns an object that contains a serialized description of the specified items. The format used to describe the items is obtained from the mimeTypes() function.
If the list of items is empty, 0 is returned instead of a serialized empty list.
|
protected |
This signal is emitted whenever the current item changes.
previous is the item that previously had the focus; current is the new current item.
|
protected |
This signal is emitted whenever the current item changes.
currentRow is the row of the current item. If there is no current item, the currentRow is -1.
|
protected |
This signal is emitted whenever the current item changes.
currentText is the text data in the current item. If there is no current item, the currentText is invalid.
|
protectedvirtual |
Reimplemented from QWidget::dropEvent().
Reimplemented from QtGui.QAbstractItemView.
|
virtual |
Reimplemented from QObject::event().
Reimplemented from QtGui.QListView.
|
protected |
This signal is emitted when the item is activated. The item is activated when the user clicks or double clicks on it, depending on the system configuration. It is also activated when the user presses the activation key (on Windows and X11 this is the Return key, on Mac OS X it is Ctrl+0).
|
protected |
This signal is emitted whenever the data of item has changed.
|
protected |
This signal is emitted with the specified item when a mouse button is clicked on an item in the widget.
See also itemPressed() and itemDoubleClicked().
|
protected |
This signal is emitted with the specified item when a mouse button is double clicked on an item in the widget.
See also itemClicked() and itemPressed().
|
protected |
This signal is emitted when the mouse cursor enters an item. The item is the item entered. This signal is only emitted when mouseTracking is turned on, or when a mouse button is pressed while moving into an item.
See also QWidget::setMouseTracking().
|
protected |
This signal is emitted with the specified item when a mouse button is pressed on an item in the widget.
See also itemClicked() and itemDoubleClicked().
|
protected |
This signal is emitted whenever the selection changes.
See also selectedItems(), QListWidgetItem::isSelected(), and currentItemChanged().
new void QtGui.QListWidget.OpenPersistentEditor | ( | QListWidgetItem | item | ) |
Opens an editor for the given item. The editor remains open after editing.
See also closePersistentEditor().
new void QtGui.QListWidget.RemoveItemWidget | ( | QListWidgetItem | item | ) |
Removes the widget set on the given item.
This function was introduced in Qt 4.3.
new int QtGui.QListWidget.Row | ( | QListWidgetItem | item | ) |
Returns the row containing the given item.
See also item().
new void QtGui.QListWidget.ScrollToItem | ( | QListWidgetItem | item, |
QAbstractItemView.ScrollHint | hint = QAbstractItemView.ScrollHint.EnsureVisible |
||
) |
Scrolls the view if necessary to ensure that the item is visible.
hint specifies where the item should be located after the operation.
new void QtGui.QListWidget.SetCurrentItem | ( | QListWidgetItem | item, |
QItemSelectionModel.SelectionFlag | command | ||
) |
Set the current item to item, using the given command.
This function was introduced in Qt 4.4.
new void QtGui.QListWidget.SetCurrentRow | ( | int | row, |
QItemSelectionModel.SelectionFlag | command | ||
) |
new void QtGui.QListWidget.SetItemHidden | ( | QListWidgetItem | item, |
bool | hide | ||
) |
If hide is true, the item will be hidden; otherwise it will be shown.
This function is deprecated. Use QListWidgetItem::setHidden() instead.
See also isItemHidden().
new void QtGui.QListWidget.SetItemSelected | ( | QListWidgetItem | item, |
bool | select | ||
) |
Selects or deselects the given item depending on whether select is true of false.
This function is deprecated. Use QListWidgetItem::setSelected() instead.
See also isItemSelected().
new void QtGui.QListWidget.SetItemWidget | ( | QListWidgetItem | item, |
QWidget | widget | ||
) |
Sets the widget to be displayed in the give item.
This function should only be used to display static content in the place of a list widget item. If you want to display custom dynamic content or implement a custom editor widget, use QListView and subclass QItemDelegate instead.
This function was introduced in Qt 4.1.
See also itemWidget() and Delegate Classes.
new void QtGui.QListWidget.SortItems | ( | Qt.SortOrder | order = Qt.SortOrder.AscendingOrder | ) |
Sorts all the items in the list widget according to the specified order.
new QListWidgetItem QtGui.QListWidget.TakeItem | ( | int | row | ) |
Removes and returns the item from the given row in the list widget; otherwise returns 0.
Items removed from a list widget will not be managed by Qt, and will need to be deleted manually.
See also insertItem() and addItem().
|
static |
|
static |
|
static |
|
static |
new QRect QtGui.QListWidget.VisualItemRect | ( | QListWidgetItem | item | ) |
Returns the rectangle on the viewport occupied by the item at item.
|
get |
This property holds the number of items in the list including any hidden items.
|
getset |
Returns the current item.
Sets the current item to item.
Unless the selection mode is NoSelection, the item is also be selected.
|
addremove |
This signal is emitted whenever the current item changes.
previous is the item that previously had the focus; current is the new current item.
|
getset |
This property holds the row of the current item.
Depending on the current selection mode, the row may also be selected.
|
addremove |
This signal is emitted whenever the current item changes.
currentRow is the row of the current item. If there is no current item, the currentRow is -1.
|
addremove |
This signal is emitted whenever the current item changes.
currentText is the text data in the current item. If there is no current item, the currentText is invalid.
|
getprotected |
|
addremove |
This signal is emitted when the item is activated. The item is activated when the user clicks or double clicks on it, depending on the system configuration. It is also activated when the user presses the activation key (on Windows and X11 this is the Return key, on Mac OS X it is Ctrl+0).
|
addremove |
This signal is emitted whenever the data of item has changed.
|
addremove |
This signal is emitted with the specified item when a mouse button is clicked on an item in the widget.
See also itemPressed() and itemDoubleClicked().
|
addremove |
This signal is emitted with the specified item when a mouse button is double clicked on an item in the widget.
See also itemClicked() and itemPressed().
|
addremove |
This signal is emitted when the mouse cursor enters an item. The item is the item entered. This signal is only emitted when mouseTracking is turned on, or when a mouse button is pressed while moving into an item.
See also QWidget::setMouseTracking().
|
addremove |
This signal is emitted with the specified item when a mouse button is pressed on an item in the widget.
See also itemClicked() and itemDoubleClicked().
|
addremove |
This signal is emitted whenever the selection changes.
See also selectedItems(), QListWidgetItem::isSelected(), and currentItemChanged().
|
get |
Returns a list of MIME types that can be used to describe a list of listwidget items.
See also mimeData().
|
get |
Returns a list of all selected items in the list widget.
|
getset |
This property holds whether sorting is enabled.
If this property is true, sorting is enabled for the list; if the property is false, sorting is not enabled.
The default value is false.
This property was introduced in Qt 4.2.
|
staticget |
|
get |
Returns the drop actions supported by this view.
See also Qt::DropActions.