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

update to Qt6 on windows, support Qt6 elsewhere #10559

Merged
merged 1 commit into from May 8, 2022

Conversation

shuffle2
Copy link
Contributor

@shuffle2 shuffle2 commented Apr 3, 2022

The main point of this PR is to generate builds that can be tested, track bugs and comments on the qt submodule update. Would love review of the build config. I was able to disable a significant enough portion of the Qt modules such that I could add the compressed pdbs into the repo and still come in at less total size than the previous commit.

I've removed the pdb archives from the qt repo to minimize size as much as possible, but not sure what the best way to keep them available for people is. any ideas?

An ARM64 build is here

Some known issues:
None!, Find some!

Fixed issues:

  1. Either Qt or compiler bug relating to atomic ptr template https://bugreports.qt.io/browse/QTBUG-102246 . It seems to be a msvc arm64 compiler bug: https://developercommunity.visualstudio.com/t/codegen-elides-initializers-when-copying/10004323 . (or, can someone point out how the source code is invalid?)
    • Fix Version/s: 6.2.5, 6.3.1 (planned: 13.5.2022), 6.4.0 Beta1
    • I've manually applied the patch for the Qt build. But it only makes a difference for ARM64, anyway.
  2. Apparently high dpi scaling issue? Externals: Update Qt to 5.15.3 | Hotkey Save&Load State Delay Fix #10546 (comment) Would be great if someone more familiar with Qt could comment on if that's expected / new behavior / what to do / etc.
    • at least initially, I've made Qt6 use Qt5's scaling behavior to fix this
  3. There is some change-detection issue with the current msbuild moc setup, which will cause problems for the buildbot if it tries to switch back and forth between Qt5 and Qt6 builds.
    • this should be fixed cleanly (i've changed the build to output the moc files to different directory)

note: this will need the changes in my branch of ext-win-qt submodule merged into the dolphin copy of that repo, and the submodule in this PR switched back.

I've created a PR for the submodule here: dolphin-emu/ext-win-qt#18

@AdmiralCurtiss AdmiralCurtiss marked this pull request as draft April 3, 2022 01:02
@JosJuice
Copy link
Member

JosJuice commented Apr 3, 2022

This PR seems to be causing errors for other PRs: #10560

@shuffle2
Copy link
Contributor Author

shuffle2 commented Apr 3, 2022

This PR seems to be causing errors for other PRs: #10560

The buildbot should be fixed now, for as long as this PR isn't rebuilt. Might have to figure out a real solution in the future if we want the buildbots to keep building PRs based on pre-qt6 and post-qt6 at the same time (?)

@dreamsyntax
Copy link
Contributor

Just wanted to confirm the Qt6 builds of Dolphin no longer have the bug "UI progress bar % freezing unless the mouse is moving over the window"

Including for scenarios such as:

  • Verify
  • Extract Disc

@shuffle2
Copy link
Contributor Author

shuffle2 commented Apr 15, 2022

possible resource for adapting Qt6 DPI scaling stuff: https://doc.qt.io/qt-6/highdpi.html (haven't read / dug into in-depth yet)
@dreamsyntax maybe you can try fiddling with some of the mentioned environment variables and see if it changes the effect you mentioned?

another link for later: https://doc.qt.io/qt-6/qt.html#HighDpiScaleFactorRoundingPolicy-enum

@dreamsyntax
Copy link
Contributor

possible resource for adapting Qt6 DPI scaling stuff: https://doc.qt.io/qt-6/highdpi.html (haven't read / dug into in-depth yet) @dreamsyntax maybe you can try fiddling with some of the mentioned environment variables and see if it changes the effect you mentioned?

I'll give it a shot. I assume basing off this branch should be sufficient enough to build?

@shuffle2
Copy link
Contributor Author

shuffle2 commented Apr 16, 2022

possible resource for adapting Qt6 DPI scaling stuff: https://doc.qt.io/qt-6/highdpi.html (haven't read / dug into in-depth yet) @dreamsyntax maybe you can try fiddling with some of the mentioned environment variables and see if it changes the effect you mentioned?

I'll give it a shot. I assume basing off this branch should be sufficient enough to build?

It should be possible to use the build from this pr and set the env vars before launching dolphin. That way you don’t need to build anything yourself. Otherwise yes, you can build this pr.

from a terminal like cmd.exe:

set VAR=VAL
Dolphin.exe

my guess is that set QT_SCALE_FACTOR_ROUNDING_POLICY=Round will restore the old appearance.

@dreamsyntax
Copy link
Contributor

set QT_SCALE_FACTOR_ROUNDING_POLICY=Round

Yep, this accomplishes the old behavior
scaling

In case anyone else tries this, only cmd worked in tests.

QT_ENABLE_HIGHDPI_SCALING=0 also looked about the same (though it is not supposed to be used)

If you set the rounding policy in the build we should be good.

@shuffle2 shuffle2 marked this pull request as ready for review April 18, 2022 09:01
@shuffle2 shuffle2 changed the title Qt6 test PR update to Qt6 on windows, support Qt6 elsewhere Apr 18, 2022
@dreamsyntax
Copy link
Contributor

Just wanted to confirm the Qt6 builds of Dolphin no longer have the bug "UI progress bar % freezing unless the mouse is moving over the window"

Including for scenarios such as:

Verify
Extract Disc

This issue I posted above is actually the same issue as the save/load hotkey issue, hence why it is resolved.
Additional fixed issue: regression in Qt5.15.1 causing UI freezing will be resolved

This PR below has details and will be closed as upgrading to Qt6 will resolve it.
#10546

@dreamsyntax
Copy link
Contributor

Is the target version still

13.5.2022 / May 13

Before this is merged in?

@shuffle2
Copy link
Contributor Author

It's ready now with Qt 6.3.0. May 13th is expected Qt 6.3.1 release date, but AFAIK we have no reason to wait for it.
My most recent force-push of this PR was to take care of RTTI issue (see dolphin-emu/ext-win-qt#18 (comment))

@mbc07
Copy link
Contributor

mbc07 commented Apr 26, 2022

Just gave this PR a try and Dolphin's GUI finally renders at sane sizes on my laptop (2560x1440 resolution on a 15.6" screen, with 150% scaling set on Windows' display settings). On master, everything is rendered at abnormally huge sizes, to the point none of the config windows fit on screen and nearly all text seems to be using bold fonts. This PR fixes all of that! Here's a comparison (master on top, this PR at bottom):

master

this PR

@dreamsyntax
Copy link
Contributor

dreamsyntax commented Apr 27, 2022

Just gave this PR a try and Dolphin's GUI finally renders at sane sizes on my laptop (2560x1440 resolution on a 15.6" screen, with 150% scaling set on Windows' display settings). On master, everything is rendered at abnormally huge sizes, to the point none of the config windows fit on screen and nearly all text seems to be using bold fonts. This PR fixes all of that! Here's a comparison (master on top, this PR at bottom):

So... it sounds like you are liking the default behavior opposed to running with

set QT_SCALE_FACTOR_ROUNDING_POLICY=Round

But this causes some elements to look stretched/off.

Can you send a screenshot of how the ImgUI (Savestate/FPS etc in-game UI) looks with the flag and without?

@shuffle2
Copy link
Contributor Author

@dreamsyntax fwiw this PR currently uses Round (changed since you tested)

@dreamsyntax
Copy link
Contributor

dreamsyntax commented Apr 27, 2022

Ah cool, assuming @mbc07 built your latest rather than the build you provided (judging by screenshot I think they did pull latest) then there's no issue 👍

@dreamsyntax
Copy link
Contributor

dreamsyntax commented Apr 27, 2022

It's ready now with Qt 6.3.0. May 13th is expected Qt 6.3.1 release date, but AFAIK we have no reason to wait for it. My most recent force-push of this PR was to take care of RTTI issue (see dolphin-emu/ext-win-qt#18 (comment))

Imo may be worth waiting the few extra days for May 13. A new minor version of Qt usually has a bigger patch1.

@dreamsyntax
Copy link
Contributor

dreamsyntax commented Apr 27, 2022

Actually, I didn't find anything out of the ordinary with the build (on the UX side) so maybe we're fine to go with 6.3.0. If there's another issue like the 5.15.1 bug, then we can update at some point.

I'm for going with 6.3.0 asap.

@mbc07
Copy link
Contributor

mbc07 commented Apr 27, 2022

@dreamsyntax the ImGui elements look stretched on master (together with the abnormally huge interface). On this PR they look much more "correct" to me, properly sized in comparison to other programs and to the Windows interface and with no apparent stretching on the ImGui elements from the rendering window...

@shuffle2
Copy link
Contributor Author

shuffle2 commented May 2, 2022

I tested that it compiles and runs fine on ubuntu jammy, packages qt6-base-dev and qt6-base-private-dev are min requirements.

Since it's after 1st of the month, merge now? :)

@dreamsyntax
Copy link
Contributor

dreamsyntax commented May 2, 2022

I tested that it compiles and runs fine on ubuntu jammy, packages qt6-base-dev and qt6-base-private-dev are min requirements.

Since it's after 1st of the month, merge now? :)

Just tried your latest build.
All the issue scenarios seem to be fixed, including the progress bar freezing issue.
ext

If there's no surprises with other PRs I think its time

@shuffle2 shuffle2 force-pushed the qt6 branch 3 times, most recently from 85ffb7f to e444ebf Compare May 3, 2022 05:30
@shuffle2
Copy link
Contributor Author

shuffle2 commented May 3, 2022

requesting the dolphin gods to push the button

@JMC47
Copy link
Contributor

JMC47 commented May 8, 2022

I think we have the Progress Report build marked, so let's see what happens with this.

@JMC47 JMC47 merged commit 5f04ad5 into dolphin-emu:master May 8, 2022
10 checks passed
@Avasam
Copy link
Contributor

Avasam commented May 8, 2022

Fixes an issue with some dropdowns: https://bugs.dolphin-emu.org/issues/12904

@shuffle2 shuffle2 deleted the qt6 branch May 13, 2022 21:48
@AhayriSG
Copy link

AhayriSG commented May 15, 2022

@refractionpcsx2
Copy link

Dunno if you guys are aware yet (though the last post might have been a clue), but Qt 6.3.0 is only compatible with Windows 10. Windows 8.1 and below just throw an error, you have to drop back to 6.2 in order for it to work on the older OS's (even though they aren't officially supported by Qt) :)

@shuffle2
Copy link
Contributor Author

We are aware; we are no longer 'supporting' win7/8. For the foreseeable future dolphin should still technically work on those OS (as core dolphin does not itself break compat, people could compile against older Qt themselves or use nogui executable), but I think it's only a matter of time before the legacy compat code in core is removed or breaks creep in.

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