Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QToolBox page header alligment

QToolBox page header alligment

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 493 Views 1 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
    rasterus
    wrote on last edited by rasterus
    #1

    qtoolbox.png

    How to change the alligment in QToolBox. In the editor it is set to left, but when the application is launched it is centered. In the picture you can see what is going on. I would like to have the same in the app as in creator. Centered looks very bad.

    P.S. I find this. Correct view is only in Fusion, in adwaita and other is centered. How to force left alligment in stylesheet?

    SGaistS 1 Reply Last reply
    0
    • R rasterus

      qtoolbox.png

      How to change the alligment in QToolBox. In the editor it is set to left, but when the application is launched it is centered. In the picture you can see what is going on. I would like to have the same in the app as in creator. Centered looks very bad.

      P.S. I find this. Correct view is only in Fusion, in adwaita and other is centered. How to force left alligment in stylesheet?

      SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      From a quick look at the implementation, the only way I currently see would be to implement a proxy model that does the painting the way you want it for QToolBox. You can take inspiration from 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

      JoeCFDJ 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        From a quick look at the implementation, the only way I currently see would be to implement a proxy model that does the painting the way you want it for QToolBox. You can take inspiration from the fusion style.

        JoeCFDJ Offline
        JoeCFDJ Offline
        JoeCFD
        wrote on last edited by
        #3

        @SGaist maybe to use QStyleOptionToolBox to override styleoption in paintevent?

        SGaistS 1 Reply Last reply
        0
        • JoeCFDJ JoeCFD

          @SGaist maybe to use QStyleOptionToolBox to override styleoption in paintevent?

          SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @JoeCFD to be tested. It's not necessarily only an option issue. Each style can render things differently with the same options applied.

          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

          • Login

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