When this:
QFont font = settings.value("MainWindow/Font").value<QFont>();
Returns a valid font value,
why doesn't this:
QColor color = settings.value("MainWindow/Color").value<QColor>();
Return a valid color value?
When this:
QFont font = settings.value("MainWindow/Font").value<QFont>();
Returns a valid font value,
why doesn't this:
QColor color = settings.value("MainWindow/Color").value<QColor>();
Return a valid color value?
Just a guess here, but the default constructor for QFont returns a valid font (the applications default font), whereas the default constructor for QColor initialises to an invalid color.
Possible, but the example in the QSettings doc is:
QColor color = settings.value("DataPump/bgcolor").value<QColor>();
If the key doesn't exist, your still left with the default though.
Bookmarks