PySide6 6.7 rounded corners
-
Ever since upgraded to PySide6 6.7, the corners of all widgets are rounded by default.
I don't mind the look that much, but it would be nice to be able to turn it off easily; either for the whole application or for certain widgets. My biggest issue is with QTableView items. There's no reason to have all of those backgounds rounded by default, it looks awkward and makes the table data difficult to read. I tried using a custom item delegate to draw unrounded rects, and that works, however it creates a lot of extra work since I was specifying pens for BackgroundRole in the model, and it doesn't automatically handle other Qt data types (e.g. QDate) for text display, etc.
-
Hi,
Which exact version of PySide6 are you currently using ?
On which OS ?
How did you install PySide6 ?
Please provide a minimal runnable script that shows that behaviour. -
I just tested and the issue described happens with the model data example provided here: https://doc.qt.io/qtforpython-6/examples/example_charts_modeldata.html
I am currently using PySide6 6.7.2 on Windows and Linux and it shows the same behavior on both operating systems. This happens in any python environment where PySide6 6.7.x is installed, and the behavior is different than when in an environment that is using PySide6 6.6.x.
I have been using conda to install PySide6, i.e. conda install PySide6
edit: The same also happens in an environment where I use pip instead of conda
-
Can you share pictures of what you have with each version ? So we can be sure we are searching for the same stuff.
-
Sorry for the delayed response. In the pyside6 6.6.x screenshot, the QTableView background colors completely fill each cell. In the pyside6 6.7.x screenshot, the QTableView baskground colors have rounded edges and do not fill each cell, and is very distracting in the context of what QTableView should be providing. I've tested different versions of pyside6 and the rounded corners started with 6.7.0 and are only displayed that way in the 6.7.x versions.
Below are screenshots of the QT Charts example linked above.
PySide6 version 6.6.x with the QTableView working as intended:
PySide6 version 6.7.x with the QTableView showing the rounded corners:
-
Can you try by using the fusion style ?
-
This is a Windows 11 new style change, and I was able to reproduce with the C++ example, so it's not PySide-related.
On Linux I was unable to reproduce. The solution is to force the usage of a different style like the Windows Vista or Fusion.Linux (PySide)
Windows 11 (C++)