this->setObjectName(name);
this->mStack = new Stack(ui->decimalPlacesBox->value(), ui->accuracyBox->value());
connect(ui->accuracyBox, SIGNAL(valueChanged(int)), mStack, SLOT(setAccuracy(int)));
ui->setupUi(this); // should come first, was causing segmentation fault.
ui->stackView->setModel(mStack);
this->setObjectName(name);
this->mStack = new Stack(ui->decimalPlacesBox->value(), ui->accuracyBox->value());
connect(ui->accuracyBox, SIGNAL(valueChanged(int)), mStack, SLOT(setAccuracy(int)));
ui->setupUi(this); // should come first, was causing segmentation fault.
ui->stackView->setModel(mStack);
To copy to clipboard, switch view to plain text mode
return index.parent();
}
QModelIndex Stack::parent ( const QModelIndex & index ) const {
return index.parent();
}
To copy to clipboard, switch view to plain text mode
The previous caused an infinite loop. I blame this on the lack of clear documentation on QAbstractItemModel.
Bookmarks