Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Qt Learning: the use of QListWidget.

Shulou Source: shulou.com Published: 2022-06-03 07:27:37 09月23日 Update

Important functions of the QListWidget class:

1.void addItem (const QWidgetItem*); / / add an item. You need to create an object for an item first.

Examples are as follows:

QListWidgetItem * ite = new QListWidgetItem;ite- > setText (QString::fromLocal8Bit ("Hangzhou"); ui.listWidget- > addItem (ite); 123

2.void addItems (const QStringList &); / / add multiple items, which are pre-placed in the QStringList container or stored in a temporary container. Examples are as follows:

Ui.listWidget- > addItems (QStringList ()

Tags: Sort subscript signal object pattern location memory content function container pointer activation example Hangzhou select important preceding icon multiple point to Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Xiaomi vpn MariaDB Docker