11 #include <QAbstractButton>
20 button->setStyleSheet(
21 QString(
"* { background-color: rgb(%1,%2,%3) }")
29 if (idealThreadCount <= 4) {
30 return idealThreadCount;
31 }
else if (idealThreadCount <= 8) {
32 return idealThreadCount - 1;
34 return idealThreadCount - 2;
static int GetMaxThreadCount()
Returns the ideal number of threads/cores with Qt Concurrent.
static void SetButtonColor(QAbstractButton *button, const QColor &col)
Sets a button background color.
static int GetMaxThreadCount(int idealThreadCount)
Returns the ideal number of threads/cores.