alors, j'ai une classe, avec son constructeur
paramligts::paramligts(QWidget *parent, const char *name)
: QWidget(parent, name)
{
layout_principal = new QVBoxLayout(this);
layout_secondaire = new QHBoxLayout();
layout_principal->addLayout(layout_secondaire);
description = new QLabel(QString("Nombre de sources lumineuses : "),this);
layout_secondaire->addWidget(description);
numlights = new QSpinBox(0,10,1,this);
numlights->setValue(0);
layout_secondaire->addWidget(numlights);
connect(numlights,SIGNAL(valueChanged(int)),this,SLOT(valueChanged(int)));
GBLights = new QGroupBox(6,Qt::Horizontal,QString("Lumières"),this);
layout_principal->addWidget(GBLights,0,Qt::AlignTop);
lbl_light = new QLabel(QString("Lumière"),GBLights);
lbl_color = new QLabel(QString("Couleur"),GBLights);
lbl_x = new QLabel(QString("X"),GBLights);
lbl_y = new QLabel(QString("Y"),GBLights);
lbl_z = new QLabel(QString("Z"),GBLights);
light_number.setAutoDelete(true);
addlite(12);
addlite(1);
}
et une méthode, connectée
void paramligts::addlite(int newValue)
{
QLabel
(…)