Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-3005

QLineEdit::getContentsMargins() not exposing internal hardcoded values

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P3: Somewhat important
    • Some future release
    • 4.4.1
    • Widgets: Layout
    • None

    Description

      Calling getContentsMargins() for a QLineEdit does not report about the two margins used internally, look for
      #define verticalMargin 1
      #define horizontalMargin 2
      and their uses in size calculations in qlineedit.cpp.

      This frustrates one who tries to calculate with the components of a QLineEdit.

      It should be also made more clear that content includes the margins around it for functions like QStyle::>sizeFromContents().

      See also http://frinring.wordpress.com/2008/10/14/better-width-with-open-sources/

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            laknoll Lars Knoll
            dettman Dean Dettman (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes