int r,g,b; QString color,stR,stG,stB; qsrand(QTime(0,0,0).msecsTo(QTime::currentTime())); r = rand() % 256; g = rand() % 256; b = rand() % 256; bool ok = true; stR.setNum(r,16);if(stR.toInt(&ok,16)<16){stR.prepend("0");} stG.setNum(g,16);if(stG.toInt(&ok,16)<16){stG.prepend("0");} stB.setNum(b,16);if(stB.toInt(&ok,16)<16){stB.prepend("0");} color.append("#"+stR+stG+stB); m_titleLabel = new QLabel(QString("<font color=%1>Welcome:</font>\r\n").arg(color),this);