Commit 9afc4938 authored by Nikita Melnichenko's avatar Nikita Melnichenko

added setTabStopDistance fallback for Qt versions < 5.10

parent 606df181
......@@ -135,7 +135,7 @@ void ListerTextArea::calculateText(const bool forcedUpdate)
const int textViewportWidth = std::max(contentRect.width() - (int) fontWidth, 0);
setTabStopDistance(fontWidth * _tabWidth);
SET_TAB_STOP_DISTANCE(fontWidth * _tabWidth);
const int sizeX = textViewportWidth / fontWidth;
......
......@@ -42,4 +42,10 @@
#define QFONTMETRICS_WIDTH(A) width(A)
#endif
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
#define SET_TAB_STOP_DISTANCE(X) setTabStopDistance(X)
#else
#define SET_TAB_STOP_DISTANCE(X) setTabStopWidth(X)
#endif
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment