falconium
9th April 2011, 00:55
Hi,
PageCounter is a QWizardPage of a QWizard. This is the slot I'm using in it:
void PageCounter::refreshDescription(int selectedItem)
{
// this changes the text of a QPlainTextEdit based on the selected item in QComboBox:
plaintextDescriptionOfSelectedCounter->setPlainText(wizard->caller->getCounterDescription(originalCounterIDs.at(select edItem)));
}
Signal is a QComboBox currentIndexChanged(int) defined in PageCounter constructor:
connect(comboCounters, SIGNAL(currentIndexChanged(int)), this, SLOT(refreshDescription(int)));
Everything works, except if I cancel the wizard, then it crashes the whole program.
Maybe I should disconnect the signal, but I don't know where. This is the only clue I have, since it had been working perfectly before I added connect.
Thx!
PageCounter is a QWizardPage of a QWizard. This is the slot I'm using in it:
void PageCounter::refreshDescription(int selectedItem)
{
// this changes the text of a QPlainTextEdit based on the selected item in QComboBox:
plaintextDescriptionOfSelectedCounter->setPlainText(wizard->caller->getCounterDescription(originalCounterIDs.at(select edItem)));
}
Signal is a QComboBox currentIndexChanged(int) defined in PageCounter constructor:
connect(comboCounters, SIGNAL(currentIndexChanged(int)), this, SLOT(refreshDescription(int)));
Everything works, except if I cancel the wizard, then it crashes the whole program.
Maybe I should disconnect the signal, but I don't know where. This is the only clue I have, since it had been working perfectly before I added connect.
Thx!