On Monday 09 June 2008, Tobias Koenig wrote: > +  QPushButton *button = new QPushButton( "", parent ); > +  button->hide(); > + > +  const QSize buttonSize = parent->style()->sizeFromContents( QStyle::CT_PushButton, &opt, > +                           fm.size( Qt::TextShowMnemonic, " X - X " ).expandedTo( QApplication::globalStrut() ), > +                           button ); > +  delete button; Are you sure you need a hidden button in order to call CT_PushButton? The whole point of the qt4 style API is that you don't -have- to specify a widget. Doesn't this work with 0 as the last argument of the sizeFromContents call? -- David Faure, faure@kde.org, dfaure@kdab.net KDE/KOffice developer, Qt consultancy projects Klarälvdalens Datakonsult AB, Platform-independent software solutions