src/gui/widgets/qcommandlinkbutton.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
   324 int QCommandLinkButton::heightForWidth(int width) const
   324 int QCommandLinkButton::heightForWidth(int width) const
   325 {
   325 {
   326     Q_D(const QCommandLinkButton);
   326     Q_D(const QCommandLinkButton);
   327     int heightWithoutDescription = d->descriptionOffset() + d->bottomMargin();
   327     int heightWithoutDescription = d->descriptionOffset() + d->bottomMargin();
   328     // find the width available for the description area
   328     // find the width available for the description area
   329     return heightWithoutDescription + d->descriptionHeight(width);
   329     return qMax(heightWithoutDescription + d->descriptionHeight(width),
       
   330                 iconSize().height() + d->topMargin() + d->bottomMargin());
   330 }
   331 }
   331 
   332 
   332 /*! \reimp */
   333 /*! \reimp */
   333 void QCommandLinkButton::paintEvent(QPaintEvent *)
   334 void QCommandLinkButton::paintEvent(QPaintEvent *)
   334 {
   335 {