fixed QT6 compatibility

This commit is contained in:
jkriege2 2022-05-12 10:35:05 +02:00
parent f475caddc1
commit 1a9593409a
2 changed files with 5 additions and 1 deletions

View File

@ -20,7 +20,7 @@
int main(int argc, char* argv[])
{
#if QT_VERSION >= QT_VERSION_CHECK(5,6,0)
#if QT_VERSION >= QT_VERSION_CHECK(5,6,0) && QT_VERSION<QT_VERSION_CHECK(6,0,0)
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps
#endif

View File

@ -292,7 +292,11 @@ void JKQTPGraphFillStyleMixin::initFillStyleInvertedColor(JKQTPGraphFillStyleMix
{
if (other) { // get style settings from parent object
m_fillColor=other->getFillColor();
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
float h=0,s=0,v=0,a=0;
#else
qreal h=0,s=0,v=0,a=0;
#endif
m_fillColor.getHsvF(&h, &s, &v, &a);
h=std::fmod(h+120.0/360.0, 1.0);
m_fillColor.setHsvF(h,s,v,a);