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. OS specific default button dimensions ?
QtWS25 Last Chance

OS specific default button dimensions ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 309 Views
  • 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.
  • SPlattenS Offline
    SPlattenS Offline
    SPlatten
    wrote on last edited by
    #1

    Is there a way to get the default Operating System specific default button dimensions? What I mean is for example when an OS specific dialog is displayed, is there a way to get the default button size width and height that is used so when I add a button to a dialog or form I can set it to appear to the same size as buttons appearing elsewhere?

    Also to go with this, is there any hints / offsets or information on where the buttons are to appear?

    Thank you

    Kind Regards,
    Sy

    jsulmJ 1 Reply Last reply
    0
    • SPlattenS SPlatten

      Is there a way to get the default Operating System specific default button dimensions? What I mean is for example when an OS specific dialog is displayed, is there a way to get the default button size width and height that is used so when I add a button to a dialog or form I can set it to appear to the same size as buttons appearing elsewhere?

      Also to go with this, is there any hints / offsets or information on where the buttons are to appear?

      Thank you

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @SPlatten said in OS specific default button dimensions ?:

      I can set it to appear to the same size as buttons appearing elsewhere?

      Actually you should not set the sizes manually, but use layouts

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      SPlattenS 1 Reply Last reply
      0
      • jsulmJ jsulm

        @SPlatten said in OS specific default button dimensions ?:

        I can set it to appear to the same size as buttons appearing elsewhere?

        Actually you should not set the sizes manually, but use layouts

        SPlattenS Offline
        SPlattenS Offline
        SPlatten
        wrote on last edited by
        #3

        @jsulm , thank you, I am using layouts but the the example I added to the layout is by default filling the cell.

        Kind Regards,
        Sy

        jsulmJ 1 Reply Last reply
        0
        • SPlattenS SPlatten

          @jsulm , thank you, I am using layouts but the the example I added to the layout is by default filling the cell.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @SPlatten Can you explain a bit better? What cell do you mean? Buttons usually do not fill whole available space.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • SPlattenS Offline
            SPlattenS Offline
            SPlatten
            wrote on last edited by
            #5

            @jsulm , Presently, I have a QGridLayout in the form, when I add widgets to the layout I use:

            pobjGridLO->addWidget(pobjNode->pobjGetWidget(), intRow, intCol, intColSpan, intRowSpan, eCellAlign);
            

            The defaults for intColSpan and intRowSpan are 1, for a button if no height and width is supplied the button fills the available area in the grid location.

            Kind Regards,
            Sy

            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