1
0
mirror of https://github.com/QtExcel/QXlsx.git synced 2025-01-16 04:42:53 +08:00
This commit is contained in:
j2doll 2020-01-02 16:46:49 +09:00
parent a7841116df
commit c2f7197864

View File

@ -142,7 +142,13 @@ QColor XlsxColor::fromARGBString(const QString &c)
QString XlsxColor::toARGBString(const QColor &c)
{
QString color;
#if QT_VERSION >= 0x050600 // Qt 5.6 or over
color = QString::asprintf("%02X%02X%02X%02X", c.alpha(), c.red(), c.green(), c.blue());
#else
color.sprintf("%02X%02X%02X%02X", c.alpha(), c.red(), c.green(), c.blue());
#endif
return color;
}