| 32 | } |
| 33 | |
| 34 | QSize KExpandableLineEdit::sizeHint() const |
| 35 | { |
| 36 | auto idealSize = QLineEdit::sizeHint(); |
| 37 | |
| 38 | int idealWidth = fontMetrics().horizontalAdvance(text()); |
| 39 | if (isClearButtonEnabled()) { |
| 40 | idealWidth += 2 * idealSize.height(); |
| 41 | } |
| 42 | idealSize.setWidth(qMax(idealWidth, m_preferredWidth)); |
| 43 | |
| 44 | return idealSize; |
| 45 | } |
| 46 | |
| 47 | #include "moc_expandablelineedit.cpp" |
nothing calls this directly
no test coverage detected