qBittorrent
qBittorrent copied to clipboard
Strange behavior when hovering over checkboxes in the settings (workaround: move main application over to fusion style)
Please provide the following information
qBittorrent version and Operating System
v4.3.0 (64-bit) Windows 10 Pro 2004 (Build 19041.264)
10.0.19041
If on linux, libtorrent-rasterbar and Qt version
Not on linux.
What is the problem
Strange animation and kind of blurry and bold checkboxes when hovering over them. (see attachments below)

As it can be seen on the screenshot below, blurry and bold checkboxes when hovering over them with the mouse pointer.

What is the expected behavior
The expected behavior is to not see that kind of strange animation around the checkboxes.
Steps to reproduce
Not sure if i'm the only one?
Extra info(if any)
My display is 2560x1440p and the scaling is at 125% When switching to 100% the issue does not occur. Did the high DPI scaling override and it did not help. No issues at all on qBittorrent v4.2.5
══════════════════════════════════════════════════════════════════════════════════
EDIT: 03.05.2021
The scaling issue has improved a lot since last time although i haven't done anything, as you can see in the demo below, the visual artifact in the checkboxes has improved significantly even though there are 1-2 checkboxes that still artifact (mostly when scrolling up and down)

I have also zoomed in on the checkboxes to give you an idea on how the artifacted ones look like:

I have this issue as well. Anything that has a hover or focus state displays distorted behavior. I'm suspecting the cause to be the Qt upgrade.
@fosam @jaywyeee Can you edit your qt.conf file with this:
[Platforms]
WindowsArguments = fontengine=freetype
EDIT: I believe this to be Qt fractional scale problem.
@fosam @jaywyeee Can you edit your
qt.conffile with this:
[Platforms]WindowsArguments = fontengine=freetypeEDIT: I believe this to be
Qt fractional scaleproblem.
@xavier2k6 Thanks for the effort
But sorry to say that it made the font a bit worse than before while the above issue still persists.
With fontengine=freetype

Without fontengine=freetype the text/font is sharper and therefore more clear as you can see below:

No fix in v4.3.0.1
@fosam @jaywyeee Can you edit your
qt.conffile with this:
[Platforms]WindowsArguments = fontengine=freetypeEDIT: I believe this to be
Qt fractional scaleproblem.
Same result as @fosam.
Can you guys try the below test build, it is 4.3.0 with a "crash fix" (This essentially became the official 4.3.0.1)
(Trying to see if compilation with MSVC 2017 Vs MSVC 2019 plays any role here with regards to HiDpi/scaling)
Windows test build of 4.3.0(Release) with https://github.com/arvidn/libtorrent/pull/5228 & listed libraries:
qBittorrent Release | 4.3.0 commit: b925cff (Oct 18, 2020)
libtorrent-rasterbar | 1.2.10.0 commit: c2f001a (Oct 19, 2020)
Qt | 5.15.1
OpenSSL | 1.1.1h
zlib | 1.2.11
Boost | 1.74
@xavier2k6 Thanks for the effort but unfortunately...👇😭

thanks @fosam for the feedback, did you experience this with 4.2,5? - that used Qt 5.13.2
We won't know for sure if Qt5.15.2 will fix this, if it is a Qt issue until around the 3rd+ of November when it is scheduled to be released & a test build can be created.
@xavier2k6 No issues at all on qBittorrent v4.2.5 Would be great if somebody could test Qt 5.15.2 it is only a few days away
@xavier2k6 No issues at all on qBittorrent v4.2.5 Would be great if somebody could test Qt 5.15.2 it is only a few days away
I will provide a test build as soon as I have access to the released Qt5.15.2 source.
@xavier2k6 Thanks!
Still the same issue with v4.3.1
I can reproduce this with 4.3.1 + Windows 10 20H2, 1080p screen, no DPI-related environment variable overrides, with 150% scaling or higher.
Doesn't matter if DPI setting is changed before qBittorrent is started or while it is running.
Workarounds mentioned in https://github.com/qbittorrent/qBittorrent/issues/13749#issuecomment-742873508 have no effect on this one.
I can reproduce this with 4.3.1 + Windows 10 20H2, 1080p screen, no DPI-related environment variable overrides, changing with 150% scaling or higher.
Doesn't matter if DPI setting is changed before qBittorrent is started or while it is running.
Workarounds mentioned in #13749 (comment) have no effect on this one.
@FranciscoPombal
I've tried all the workarounds, non-work, but note that i have no issues @100% scaling as i mentioned above. 1440p screen. Were you able to reproduce the issue @100% scaling too?
@fosam
@FranciscoPombal
I've tried all the workarounds, non-work, but note that i have no issues @100% scaling as i mentioned above. 1440p screen. Were you able to reproduce the issue @100% scaling too?
As my comment says:
- the linked workarounds don't solve this problem
- In my case (1080p monitor) I can only reproduce on 150% scaling or higher (though it is possible that the problem also exists at 125% but the artifacting is too small to notice). No issues at 100%.
As my comment says:
- the linked workarounds don't solve this problem
- In my case (1080p monitor) I can only reproduce on 150% scaling or higher (though it is possible that the problem also exists at 125% but the artifacting is too small to notice). No issues at 100%.
@FranciscoPombal
Yes. for me the issue starts @125% and the more you go up, the worse it gets, keep also in mind that the settings menu i'm showing above in the issue is not the only affected item, the pop-up windows for example also don't look natural, like the pop-up window when you check for updates. it looks distorted.
My question though is why qBittorrent v4.2.5 does not have this issue at all, what's the difference?
Let's hope it gets fixed in future developments :)
@fosam
Yes. for me the issue starts @125% and the more you go up, the worse it gets, keep also in mind that the settings menu i'm showing above in the issue is not the only affected item, the pop-up windows for example also don't look natural, like the pop-up window when you check for updates. it looks distorted.
:+1:
My question though is why qBittorrent v4.2.5 does not have this issue at all, what's the difference?
Newer Qt version. Qt support for high DPI scaling has always been a mess. It is now better than ever, but little quirks like this remain. While this a straight regression in your use case, for other users, there were even worse issues that got fixed. It's sort of a case of "whack a bug here, another one (smaller, at least) appears somewhere else".
Let's hope it will be better in future development :)
These kinds of issues should all go away once Qt supports the Per Monitor V2 mechanism/protocol/whatever in Windows. This is expected for Qt6, but there is a chance that it might be backported to one of the remaining Qt5.x releases. Not much we can do until then. Just enjoy the other features. Recent versions, >= 4.3.0 offer massive improvements in performance and connectivity over 4.2.x versions.
Thanks!
@FranciscoPombal @fosam I've been able to reproduce this issue on 150% scaling/1080p monitor too & I believe below is a fix/workaround Can you try? (tested with 4.3.1 portable profile/defaults....so no qt.conf manipulation)
Select qBittorrent.exe->right click->Properties->Compatibility->Change high DPI settings
High DPI scaling override Override high DPI scaling behaviour->Enable Scaling performed by:->System
@FranciscoPombal @fosam I've been able to reproduce this issue on 150% scaling/1080p monitor too & I believe below is a fix/workaround Can you try? (tested with 4.3.1 portable profile/defaults....so no
qt.confmanipulation)Select
qBittorrent.exe->right click->Properties->Compatibility->Change high DPI settingsHigh DPI scaling override Override high DPI scaling behaviour->Enable Scaling performed by:->System
@xavier2k6
That is the first thing that comes to mind, and of course doesn't work, it makes the font look the worst, same as when we tried the free font workaround, check the comparison above..
Sorry to disappoint :(
@fosam Have you Let Windows try to fix apps so they're not blurry enabled as well under Advanced scaling settings?
@fosam Have you
Let Windows try to fix apps so they're not blurryenabled as well underAdvanced scaling settings?
Yes of course, i tried all those workarounds before opening this issue here, and unfortunately non of them worked.
I think i need better eyes to be able to use 100% scaling 😁
@fosam are you running in portable mode by any chance?
Can you post a screenshot of qBittorrent.exe via Task Manager->Details with column DPI Awareness active for each Windows argument 0,1,2
@fosam are you running in
portable modeby any chance?Can you post a screenshot of
qBittorrent.exevia Task Manager->Details with columnDPI Awarenessactive for each Windows argument0,1,2
@xavier2k6 I'm running in regular mode.
Screenshot of qBittorrent.exe in task manager or what? there's too little details in there..
dpiawareness=1

Can you run qbittorrent -style fusion from a command prompt/where you have qbittorrent installed.
@xavier2k6 I did, and the issue did not appear there, however, the style/theme of qbittorrent changed, now it looks more like a Mac/Linux theme and it didn't look as sharp as the standard one, but ok this workaround fixed the issue kind of, Thanks!
In my next reply i will include a screenshot showing a small demo.
qbittorrent -style fusion

If we are to fully support HiDPI screens etc we will have to probably make qBittorrent on windows use the fusion style as default.
High DPI Support in Qt
While the macOS style fully supports high-DPI, the Windows desktop style currently has some limitations with certain scale factors. In these cases, consider using the Fusion style instead, which supports high-DPI in all cases.
ref: https://doc.qt.io/qt-5/highdpi.html#:~:text=Windows%20desktop%20style%20currently%20has%20some%20limitations%20with%20certain%20scale%20factors.%20In%20these%20cases,%20consider%20using%20the%20Fusion%20style%20instead
@xavier2k6
Are there any other ways to apply fusion style other than running qBittorrent from a command prompt?
@xavier2k6
Why don't i have issues with this one? running on the exact same system.
