gmarull / qtmodern

PyQt/PySide Widgets Modern User Interface
MIT License
751 stars 113 forks source link

qtmodern style looks wrong with the newest PyQt5 version #52

Closed mapfiable closed 4 years ago

mapfiable commented 4 years ago

So I was running Python with the pyqt version that comes with Anaconda, namely 5.9.2, why it comes with this old version, I don't know. I wasn't aware of it until I encountered a bug in PyQt5, that should have been a thing of the past. Ever since I updated my pyqt version to 5.14.1 using pip install PyQt5, the qtmodern style is wrong, with the bigger issue being that sliders disappear when the mouse is not hovering above them and checkboxes not being visible when inside a groupbox e.g.. How can I fix this?

qtmodern

Running on Windows 10 Home build 18363.720 using: PyCharm version: 2019.3.4 (Professional Edition) Anaconda vesion: 2020.02 Python version: 3.7.7 PyQt version: 5.14.1

WBP20 commented 4 years ago

Hi, I faced same problem with scrollbars handlers, I went to the style.css file and changed colors of the vertical and horizontal handlers to "midlight" to make them visible because it has background colors (making them invisible).

mapfiable commented 4 years ago

Hi, thanks for your reply! Sorry for being ignorant, but which 'styles.css' file do you mean exactly?

WBP20 commented 4 years ago

\Python\Python38-32\Lib\site-packages\qtmodern\resources\style.css

mapfiable commented 4 years ago

Thank you, that worked for me! I also changed the hover color to 'highlight'. It's more complicated to change the indicator color of the checkbox though. Apparently, you need to re-create the whole stylesheet for that, and only change what you need. But I don't know where I would find the default values.

Jerakin commented 4 years ago

Would love if you guys would have time to do a PR with some before/after images of your fix. With preferably the new PyQt version and the old one :)

mapfiable commented 4 years ago

Hey, sorry, what's a PR?

Jerakin commented 4 years ago

PR means pull request. Basically you can propose changes to the project to improve it, it's one of the cornerstones in Open Source applications :)

mapfiable commented 4 years ago

Ah, ok, I can give it a try! Not sure how that will work from a technical standpoint though..

mapfiable commented 4 years ago

https://github.com/gmarull/qtmodern/pull/54 gave it a try. Is that what you were asking?

Jerakin commented 4 years ago

Hi again! I had a few minutes to take a look at this and it seems to have been fixed on master already (even before the PR was merged). Was the qtmodern version you where using installed with pip install qtmodern or did you install from master in a different way?

mapfiable commented 4 years ago

I used pip install qtmodern. Maybe the order in which I install things is relevant? I think I went Anaconda with pyqt 5.9.2 -> pip install qtmodern -> pip install PyQt5. What do you mean by it was fixed already though? If the style sheet wasn't adapted like I did, it was fixed in a different way I guess?

Jerakin commented 4 years ago

The project is always improving and getting bug fixes. Because of the work involved not every bugfix gets a release and there is time inbetween them (for instance, your fix have been merged but even if you run pip install qtmodern you will notice that your fix is not present). Since the release of 0.2.0 there have been a couple of fixes, but the 0.2.0 is the latest release distributed with pip.

In short master have bug fixes that have not yet been released. :)

mapfiable commented 4 years ago

Ah, I see! Thanks for the clarification.