mein Signalmapper, den ich definert habe, bringt mein Programm zum Absturz und ich weiß nicht so recht warum. Evt. seht ihr ja den Fehler.
Ich definiere in der Header-Datei meinen SignalMapper:
Code: Alles auswählen
...
class QSignalMapper;
class MySourceWindow: public QMdiSubWindow
{
Q_OBJECT
...
private slots:
void addToParameterList(QString);
private:
QSignalMapper* signalLineEdits;
...Code: Alles auswählen
...
signalLineEdits = new QSignalMapper(this);
connect(signalLineEdits, SIGNAL(mapped(QString)), this, SLOT(addToParameterList(QString)));
...Code: Alles auswählen
void MySourceWindow::setSigmaGroupBox(QString illuType){
qDebug("MySourceWindow::setSigmaGroupBox(%s) - Start", qPrintable(illuType));
if(sigmaGroupBox){
qDebug("MySourceWindow::setSigmaGroupBox() - delete sigmaGroupBox & buttonGroupBox");
sourceMainLayout->removeWidget(sigmaGroupBox);
sourceMainLayout->removeWidget(buttonGroupBox);
delete buttonGroupBox;
delete sigmaGroupBox;
}
if(otherGroupBox){
qDebug("MySourceWindow::setSigmaGroupBox() - delete otherGroupBox");
sourceMainLayout->removeWidget(otherGroupBox);
delete otherGroupBox;
}
if(parameterList->contains("type")){
int index = parameterList->indexOf("type");
parameterList->removeAt(index);
parameterList->removeAt(index);
}
sigmaGroupBox = new QGroupBox(tr("Sigma"));
sigmaGroupBoxLayout = new QGridLayout();
if(illuType == "circle"){
parameterList->append("type");
parameterList->append("circle");
sigmaInnerLineEdit = new QLineEdit();
sigmaGroupBoxLayout->addWidget(sigmaInnerLineEdit);
sigmaGroupBox->setLayout(sigmaGroupBoxLayout);
sourceMainLayout->addWidget(sigmaGroupBox);
signalLineEdits->setMapping(sigmaInnerLineEdit,"sigmaInnerLE");
connect(sigmaInnerLineEdit, SIGNAL(textChanged(QString)), signalLineEdits, SLOT(map()));
}
}Ich kann keinen Fehler entdecken
Viele Grüße
Jana