Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

should be able to compile with Qt6 #23

Open
vladimir-kraus opened this issue Feb 4, 2021 · 6 comments
Open

should be able to compile with Qt6 #23

vladimir-kraus opened this issue Feb 4, 2021 · 6 comments

Comments

@vladimir-kraus
Copy link

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

@randrew
Copy link
Owner

randrew commented Feb 24, 2021

Do you have a list?

@shinespeciall
Copy link

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

@randrew
Copy link
Owner

randrew commented May 24, 2021

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

@jcelerier
Copy link

jcelerier commented Aug 18, 2022

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
Copy link

jcelerier commented Sep 29, 2022

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.

@randrew
Copy link
Owner

randrew commented Oct 3, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants