Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Unsolved OS specific default button dimensions ?

    General and Desktop
    2
    5
    127
    Loading More Posts
    • 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.
    • SPlatten
      SPlatten last edited by

      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

      jsulm 1 Reply Last reply Reply Quote 0
      • jsulm
        jsulm Lifetime Qt Champion @SPlatten last edited by

        @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

        SPlatten 1 Reply Last reply Reply Quote 0
        • SPlatten
          SPlatten @jsulm last edited by

          @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

          jsulm 1 Reply Last reply Reply Quote 0
          • jsulm
            jsulm Lifetime Qt Champion @SPlatten last edited by

            @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 Reply Quote 0
            • SPlatten
              SPlatten last edited by

              @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 Reply Quote 0
              • First post
                Last post