8-char tab stops are too big in the preamble editor.

This commit is contained in:
Richard Heck 2018-04-01 22:07:21 -04:00
parent e666b5eced
commit b4d885ac69

View File

@ -473,6 +473,10 @@ PreambleModule::PreambleModule(QWidget * parent)
connect(findButtonPB, SIGNAL(clicked()), this, SLOT(findText()));
connect(findLE, SIGNAL(returnPressed()), this, SLOT(findText()));
checkFindButton();
// https://stackoverflow.com/questions/13027091/how-to-override-tab-width-in-qt
const int tabStop = 4;
QFontMetrics metrics(preambleTE->currentFont());
preambleTE->setTabStopWidth(tabStop * metrics.width(' '));
}