thanks a lot, but the code doesn't work.
code:
btnGroup->addButton(button1,0);
button1
->setGeometry
(QRect(175,
85,
45,
43));
connect(btnGroup,SIGNAL(ButtonClicked(int)),this,SLOT(show_IL(int)));
QButtonGroup *btnGroup;
btnGroup=new QButtonGroup(this);
QPushButton *button1;
button1 = new QPushButton("LD",this);
btnGroup->addButton(button1,0);
button1->setGeometry(QRect(175,85,45,43));
connect(btnGroup,SIGNAL(ButtonClicked(int)),this,SLOT(show_IL(int)));
To copy to clipboard, switch view to plain text mode
the code in show_IL:
if(i == 0)
{
}
if(i == 0)
{
QString str = "LD";
list->addItem(QString(str));
}
To copy to clipboard, switch view to plain text mode
when the button1 is clicked, there is nothing show on my list! the slot doesn't work!
please help me!
Bookmarks