mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-21 06:13:41 +00:00
LibreVNA-GUI: Use 'horizontalAdvance' instead of 'width' for text width
This commit is contained in:
parent
daf7218cfd
commit
76448e64ee
2 changed files with 6 additions and 6 deletions
|
|
@ -112,7 +112,7 @@ SpectrumAnalyzer::SpectrumAnalyzer(AppWindow *window, QString name)
|
|||
|
||||
auto eStart = new SIUnitEdit("Hz", " kMG", 6);
|
||||
// calculate width required with expected string length
|
||||
auto width = QFontMetrics(eStart->font()).width("3.00000GHz") + 15;
|
||||
auto width = QFontMetrics(eStart->font()).horizontalAdvance("3.00000GHz") + 15;
|
||||
eStart->setFixedWidth(width);
|
||||
eStart->setToolTip("Start frequency");
|
||||
connect(eStart, &SIUnitEdit::valueChanged, this, &SpectrumAnalyzer::SetStartFreq);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue