You need to explicitly create a QColor object. This should work:
dialogBoja = postavke.value("boja", QColor(Qt::black)).toString();
The reason for this is explained in the header:
// These constructors don't create QVariants of the type associcated // with the enum, as expected, but they would create a QVariant of // type int with the value of the enum value. // Use QVariant v = QColor(Qt::red) instead of QVariant v = Qt::red for // example.
Dan milburn
source share