6 QGridLayout*
layout =
new QGridLayout(
this);
9 layout->addWidget(
new QLabel(tr(
"Message:"),
this), 0, 0, 1, 2);
10 layout->addWidget(
myItems, 1, 0, 1, 2);
12 QPushButton* add =
new QPushButton(tr(
"add"),
this);
13 connect(add, SIGNAL(clicked(
bool)),
this, SLOT(
onAddItem(
bool)));
14 layout->addWidget(add, 2, 0);
16 QPushButton*
remove =
new QPushButton(tr(
"remove"),
this);
17 connect(
remove, SIGNAL(clicked(
bool)),
this, SLOT(
onDeleteItem(
bool)));
18 layout->addWidget(
remove, 2, 1);
20 layout->addWidget(
new QLabel(tr(
"Message:"),
this), 3, 0);
50 for (
int i = 0; i <
myItems->count(); i++)
51 data.append(
myItems->item(i)->text());
void onCurrentItemChanged(int currentRow)
void setData(const QStringList &list)
CREStringListPanel(QWidget *parent)
QStringList getData() const
virtual ~CREStringListPanel()