Set preamble tab stop to 4 chars.

This commit is contained in:
Richard Heck 2018-04-01 22:18:37 -04:00
parent 2bb9d49527
commit d1fa6f10e5

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(' '));
}