Exemplo n.º 1
0
void KNHeaderButton::updateWidth()
{
    int sizeParam=qMax(m_rawFontMetrics.width(m_text->text())+m_leftMargin,
                       110);
    resize(sizeParam, height());
    emit requireSetLeftSpacing(sizeParam);
}
Exemplo n.º 2
0
inline void KNHeaderButton::updateWidth()
{
    //Update the size.
    resize(m_text->fontMetrics().width(m_text->text())+m_leftMargin,
           height());
    //Ask to resize the space to fit the width.
    emit requireSetLeftSpacing(width());
}