Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. PySide6 6.7 rounded corners
Forum Updated to NodeBB v4.3 + New Features

PySide6 6.7 rounded corners

Scheduled Pinned Locked Moved Unsolved Qt for Python
8 Posts 3 Posters 2.0k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rtomek
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • R Offline
        R Offline
        rtomek
        wrote on last edited by rtomek
        #3

        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

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Can you share pictures of what you have with each version ? So we can be sure we are searching for the same stuff.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • R Offline
            R Offline
            rtomek
            wrote on last edited by
            #5

            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:
            Screenshot 2024-08-14 124352 - chart demo pyside 6.6.jpg

            PySide6 version 6.7.x with the QTableView showing the rounded corners:
            Screenshot 2024-08-14 124106 - chart demo pyside 6.7.jpg

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Can you try by using the fusion style ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • R Offline
                R Offline
                rtomek
                wrote on last edited by
                #7

                Updating the chart example to use the following

                if __name__ == "__main__":
                    app = QApplication(sys.argv)
                    app.setStyle('Fusion')
                

                I get identical results for both 6.6.x and 6.7.x

                Screenshot 2024-08-14 125933 - chart demo fusion style.jpg

                1 Reply Last reply
                0
                • CristianMaureiraC Offline
                  CristianMaureiraC Offline
                  CristianMaureira
                  wrote on last edited by CristianMaureira
                  #8

                  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)
                  2024-08-21-103951_924x502_scrot.png

                  Windows 11 (C++)
                  Screenshot 2024-08-21 105451.png

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved