phantomstyle icon indicating copy to clipboard operation
phantomstyle copied to clipboard

should be able to compile with Qt6

Open vladimir-kraus opened this issue 4 years ago • 6 comments

When trying to build with Qt6, there are several deprecation related errors.

vladimir-kraus avatar Feb 04 '21 00:02 vladimir-kraus

Do you have a list?

randrew avatar Feb 24 '21 20:02 randrew

msvc compiler gives me these: image the first error means: invalid Preprocessor command "warning", it only works in gcc? gcc gives me these: image image perhaps don't need a lot of changes to port to Qt6

shinespeciall avatar Mar 19 '21 15:03 shinespeciall

I think that's not too bad. Replace .background() with .window() to fix most of them.

randrew avatar May 24 '21 06:05 randrew

Another one is that tabWidth in QStyleOptionMenuItem has changed in reservedShortcutWidth:

#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
   int tabWidth = menuItem->tabWidth;
#else
   int tabWidth = menuItem->reservedShortcutWidth;
#endif

I have it working in Qt6 (at least haven't noticed any remaining issue) in my fork, I can make a PR if you want @randrew

jcelerier avatar Aug 18 '22 09:08 jcelerier

hmm since 6.3 / 6.4 some UI glitches have appeared though, which seem to be due to the QPalette hash. Replacing fastfragile_hash_qpalette with accurate_hash_qpalette fixes it.

jcelerier avatar Sep 29 '22 22:09 jcelerier

Thanks for letting me know. I'll take a look when I get around to updating this for Qt6. It relies on the internals of the QPalette data to do a fast 'hash'. It only saves a little bit of work, which I think is nice for frequent small drawing operations, but using the fallback 'accurate' hash is not that big of a deal for now.

randrew avatar Oct 03 '22 03:10 randrew