• OctoMY API
  • OctoMY API Reference
  • C++ Classes
  • OctoMY
  • EditableLabel
  • EditableLabel Class

    Label that becomes editable on double-click, with an inline pencil affordance painted after the text. More...

    Header: #include <EditableLabel>
    Since: 1.0
    Inherits: QLabel

    Detailed Description

    The pencil icon is rendered directly in paintEvent, immediately to the right of the text run (with an 8 px gap). This avoids the flicker / placement bugs of the previous QLabel-child approach, where the icon either ended up under the text on first paint or got stranded at the right edge after typing.

    A QLineEdit child overlays the label during edit mode. As the user types, the label's minimumWidth grows so the surrounding layout gives us extra space and the line edit can paint past the original label width.

    See also QLabel and QLineEdit.