Qt5: 'int QFontMetrics::width' is deprecated since Qt 5.11: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
This commit is contained in:
@@ -65,6 +65,7 @@
|
||||
#include "SoTextLabel.h"
|
||||
#include "SoFCInteractiveElement.h"
|
||||
#include "BitmapFactory.h"
|
||||
#include "Tools.h"
|
||||
|
||||
using namespace Gui;
|
||||
|
||||
@@ -452,7 +453,7 @@ void SoFrameLabel::drawImage()
|
||||
QStringList lines;
|
||||
for (int i=0; i<num; i++) {
|
||||
QString line = QString::fromUtf8(s[i].getString());
|
||||
w = std::max<int>(w, fm.width(line));
|
||||
w = std::max<int>(w, QtTools::horizontalAdvance(fm, line));
|
||||
lines << line;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user