ich hab seit längerem n Problem mit dem QWizard... bzw mit der QWizardPage.
Ich habe eine WizardPage die 8 QComboBoxen, in 2 Groupboxes aufgeteilt beinhaltet
Jetzt soll der "weiter" button erst verfügbar sein, wenn in jeder ComboBoxgruppe mindestens einwas ausgewählt ist...
Laut der Dokumentation kann man das mit isCompleted() prüfen, bzw selbst implementieren...
Dies hab ich getan..
Code: Alles auswählen
bool WP_InOut::isComplete(void)
{
unsigned int unCount = 0;
QList<QComboBox*> comboIn = objInGroupBox->findChildren<QComboBox*>();
foreach(QComboBox* objCombo, comboIn)
{
unCount += objCombo->currentText().toInt();
}
if(unCount == 0) return false;
unCount = 0;
QList<QComboBox*> comboOut = objOutGroupBox->findChildren<QComboBox*>();
foreach(QComboBox* objCombo, comboOut)
{
unCount += objCombo->currentText().toInt();
}
if(unCount == 0) return false;
return true;
}
connect(comboTemp, SIGNAL(currentIndexChanged(int)), this->parent(), SIGNAL(completeChanged()));
Dennoch sind meine Buttons ständig "aktiviert"....
Hab keine Idee mehr an was das liegen könnte...
Vielen Dank schonmal für eure Antworten
MFG
CSchirner[/code]