MCPcopy Create free account
hub / github.com/BatchDrake/SigDigger / adjustButtonToSize

Method adjustButtonToSize

Components/TimeWindow.cpp:1004–1013  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1002}
1003
1004void
1005TimeWindow::adjustButtonToSize(QPushButton *button, QString text)
1006{
1007 if (text.size() == 0)
1008 text = button->text();
1009
1010 button->setMaximumWidth(
1011 SuWidgetsHelpers::getWidgetTextWidth(button, text) +
1012 5 * SuWidgetsHelpers::getWidgetTextWidth(button, " "));
1013}
1014
1015TimeWindow::TimeWindow(QWidget *parent) :
1016 QMainWindow(parent),

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected