const QPalette& palOrg = statusBar()->palette();
palCopy.
setColor(QPalette::WindowText, Qt
::red);
qDebug
() << palCopy.
color(QPalette::WindowText) << palOrg.
color(QPalette::WindowText);
//logs QColor(ARGB 1, 1, 0, 0) QColor(ARGB 1, 0, 0, 0)
statusBar()->setPalette(palCopy);
qDebug
() << palCopy.
color(QPalette::WindowText) << palOrg.
color(QPalette::WindowText);
//logs QColor(ARGB 1, 1, 0, 0) QColor(ARGB 1, 1, 0, 0)
const QPalette& palOrg = statusBar()->palette();
QPalette palCopy = palOrg;
palCopy.setColor(QPalette::WindowText, Qt::red);
qDebug() << palCopy.color(QPalette::WindowText) << palOrg.color(QPalette::WindowText);
//logs QColor(ARGB 1, 1, 0, 0) QColor(ARGB 1, 0, 0, 0)
statusBar()->setPalette(palCopy);
qDebug() << palCopy.color(QPalette::WindowText) << palOrg.color(QPalette::WindowText);
//logs QColor(ARGB 1, 1, 0, 0) QColor(ARGB 1, 1, 0, 0)
To copy to clipboard, switch view to plain text mode
Bookmarks