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. The naming history of 'QLayout::getContentsMargins()' member?
Forum Update on Monday, May 27th 2025

The naming history of 'QLayout::getContentsMargins()' member?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.5k 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.
  • J Offline
    J Offline
    joonhwan
    wrote on last edited by
    #1

    In Qt API, the getter function does not seem to use 'get' for its prefix, generally. But when reading Qt code, I met '
    getContentsMargins()'. Is there anybody know how come this member is named? ( though I believe trolls can answer this :-) )

    joonhwan at gmail dot com

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lgeyer
      wrote on last edited by
      #2

      Most probably because it doesn't return anything (as a getter is usually expected to do), but uses out-parameters instead.
      @
      void QWidget::getContentsMargins(int *left, int *top, int *right, int *bottom) const
      @
      In addition, there is a "conventional" contentsMargin() getter.
      @
      QMargins QWidget::contentsMargins() const
      @

      1 Reply Last reply
      0
      • J Offline
        J Offline
        joonhwan
        wrote on last edited by
        #3

        I see. Thanks!

        joonhwan at gmail dot com

        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