You can use
QSize QFontMetrics::size ( int flags, const QString & text, int tabStops = 0, int * tabArray = 0 ) const
To copy to clipboard, switch view to plain text mode
and then setGeometry to the button using the size
You can create QFontMetrics with a special font if you are translating to arabic for example.
However because of the change in size, it is recommended to have widgets inside layouts so they will expand while taking other widgets into consideration.
If you are making an application to handle multiple languages, consider to read the documentation about Internationalization.
Bookmarks