Qt5: 'int QFontMetrics::width' is deprecated since Qt 5.11: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]

This commit is contained in:
wmayer
2020-06-10 12:27:50 +02:00
committed by wwmayer
parent db3f9008c0
commit 1ee3d79d7c
21 changed files with 107 additions and 29 deletions

View File

@@ -67,6 +67,7 @@
#include "ManualAlignment.h"
#include "BitmapFactory.h"
#include "SoAxisCrossKit.h"
#include "Tools.h"
using namespace Gui;
@@ -472,7 +473,7 @@ public:
QColor front;
front.setRgbF(0.8f, 0.8f, 0.8f);
int w = fm.width(text);
int w = QtTools::horizontalAdvance(fm, text);
int h = fm.height();
QImage image(w,h,QImage::Format_ARGB32_Premultiplied);