On Windows, Qt QPushButtons have a standard width, regardless of the button text. The following function was created to assign a more optimal width to a QButton (applied to the "Scroll:" button in the image on the right).
void RwQtUtils::qButtonLimitWidth (QButton*, const char* txt=NULL);
The current button text is used if no 'txt' parameter is provided. This method was added to both 4.7 Prerel and 4.8 Builds, in the QtGUI library.
![]() |
![]() |
Note: A difference between these images not relevant for this example is that the image on the right also has a Plot button. This is forcing the "Scroll" line to have a slightly larger height.
---