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

QLineEdit::getContentsMargins() not exposing internal hardcoded values

XMLWordPrintable

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

      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/

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes