Revert horizontalAdvance() to width() so it build on old Qt5 versions.

This commit is contained in:
Jean-Paul Chaput 2022-07-14 15:19:24 +02:00
parent db0ecb878d
commit 34a3ae327c
1 changed files with 2 additions and 2 deletions

View File

@ -1703,7 +1703,7 @@ namespace Hurricane {
if ( flags & BigFont ) font.setPointSize ( Graphics::isHighDpi() ? 7 : 18 );
QFontMetrics metrics = QFontMetrics(font);
int width = metrics.horizontalAdvance( text );
int width = metrics.width( text );
//int height = metrics.height ();
int angle = 0;
@ -1943,7 +1943,7 @@ namespace Hurricane {
{
QFont font = Graphics::getNormalFont();
QFontMetrics metrics = QFontMetrics(font);
int tickLength = metrics.horizontalAdvance( "+00000u" );
int tickLength = metrics.width( "+00000u" );
Point origin = ruler->getOrigin ();
Point extremity = ruler->getExtremity ();
Point angle = ruler->getAngle ();