| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a809046 commit f9fc261
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -45,6 +45,10 @@ | |||
| 45 | 45 | ||
| 46 | 46 | #include <QtGui> | |
| 47 | 47 | ||
| 48 | + #if QT_VERSION < QT_VERSION_CHECK(5, 11, 0) | ||
| 49 | + #define horizontalAdvance width | ||
| 50 | + #endif | ||
| 51 | + | ||
| 48 | 52 | ///////////////////////////// | |
| 49 | 53 | // QtGnuplotEnhanced | |
| 50 | 54 | ||
@@ -111,7 +115,7 @@ QRectF QtGnuplotEnhancedFragment::boundingRect() const | |||
| 111 | 115 | qreal QtGnuplotEnhancedFragment::width() const | |
| 112 | 116 | { | |
| 113 | 117 | QFontMetricsF metrics(m_font); | |
| 114 | - return metrics.width(m_text); | ||
| 118 | + return metrics.horizontalAdvance(m_text); | ||
| 115 | 119 | } | |
| 116 | 120 | ||
| 117 | 121 | void QtGnuplotEnhancedFragment::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments