D7010: KSqueezedTextLabel: call updateGeometry() when text changes

Sven Brauch noreply at phabricator.kde.org
Sun Jul 30 21:30:20 UTC 2017


brauch created this revision.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.

REVISION SUMMARY
  By changing the full text, the sizeHint() of the widget changes. If the                                                                                                                      
  text is currently squeezed, this however does not imply that the text                                                                                                                        
  passed to QLabel::setText() changes (which is a no-up if not). Thus we need                                                                                                                  
  to call updateGeometry() to notify the layout system about the size change.                                                                                                                  
  Otherwise, the label misbehaves when you e.g. set the size policy to                                                                                                                         
  Minimum and place it next to a spacer with Expanding policy, and then                                                                                                                        
  change the text.

REPOSITORY
  R236 KWidgetsAddons

REVISION DETAIL
  https://phabricator.kde.org/D7010

AFFECTED FILES
  src/ksqueezedtextlabel.cpp

To: brauch, cfeck
Cc: #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170730/618ddd1a/attachment.html>


More information about the Kde-frameworks-devel mailing list