mirror of
https://github.com/QtExcel/QXlsx.git
synced 2025-01-16 04:42:53 +08:00
This commit is contained in:
parent
a7841116df
commit
c2f7197864
@ -142,7 +142,13 @@ QColor XlsxColor::fromARGBString(const QString &c)
|
|||||||
QString XlsxColor::toARGBString(const QColor &c)
|
QString XlsxColor::toARGBString(const QColor &c)
|
||||||
{
|
{
|
||||||
QString color;
|
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());
|
color.sprintf("%02X%02X%02X%02X", c.alpha(), c.red(), c.green(), c.blue());
|
||||||
|
#endif
|
||||||
|
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user