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. Issues resizing stylesheet indicators
Forum Updated to NodeBB v4.3 + New Features

Issues resizing stylesheet indicators

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 285 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.
  • M Offline
    M Offline
    mchabala
    wrote on last edited by
    #1

    Hello,

    I'm using Qt for a desktop application and am looking for some help with resizing indicators through stylesheets. I am able to set the indicator size for various widgets in stylesheets by doing the following:

    QRadioButton::indicator{ 
       height: 15px;
       width: 15px;
    } 
    

    and I'd like for the indicator sizes to be larger when running the application in fullscreen, but currently when running in fullscreen the indicator sizes will always be what I set in the stylesheet (for this example 15 px).

    Is there any way of specifying a max and min indicator size or is there any way that Qt can dynamically update the indicator size similar to how it resizes widgets on layouts?

    Thanks in advance.

    Pl45m4P 1 Reply Last reply
    0
    • M mchabala

      Hello,

      I'm using Qt for a desktop application and am looking for some help with resizing indicators through stylesheets. I am able to set the indicator size for various widgets in stylesheets by doing the following:

      QRadioButton::indicator{ 
         height: 15px;
         width: 15px;
      } 
      

      and I'd like for the indicator sizes to be larger when running the application in fullscreen, but currently when running in fullscreen the indicator sizes will always be what I set in the stylesheet (for this example 15 px).

      Is there any way of specifying a max and min indicator size or is there any way that Qt can dynamically update the indicator size similar to how it resizes widgets on layouts?

      Thanks in advance.

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #2

      @mchabala said in Issues resizing stylesheet indicators:

      Is there any way of specifying a max and min indicator size or is there any way that Qt can dynamically update the indicator size similar to how it resizes widgets on layouts?

      Stylesheet and layouts are two different things...
      If you set a fixed 15px, it is 15px.

      You could update the stylesheet when you go fullscreen mode.


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      M 1 Reply Last reply
      1
      • Pl45m4P Pl45m4

        @mchabala said in Issues resizing stylesheet indicators:

        Is there any way of specifying a max and min indicator size or is there any way that Qt can dynamically update the indicator size similar to how it resizes widgets on layouts?

        Stylesheet and layouts are two different things...
        If you set a fixed 15px, it is 15px.

        You could update the stylesheet when you go fullscreen mode.

        M Offline
        M Offline
        mchabala
        wrote on last edited by
        #3

        @Pl45m4 Thanks for the reply! One more question, is there any way to update the indicator other than using the stylesheet?

        Currently I have an example working where the default stylesheet gets loaded and then the indicator sizes get overwritten during a resizeEvent(), but I was wondering if a non-stylesheet option may be better (if it exists).

        SGaistS 1 Reply Last reply
        0
        • M mchabala

          @Pl45m4 Thanks for the reply! One more question, is there any way to update the indicator other than using the stylesheet?

          Currently I have an example working where the default stylesheet gets loaded and then the indicator sizes get overwritten during a resizeEvent(), but I was wondering if a non-stylesheet option may be better (if it exists).

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

          Hi,

          You can create a proxy style and customize there the rendering of the QRadioButton.

          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
          1

          • Login

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