Added Qt dependent macro for QFontMetrics::horizontalAdvance/width

This commit is contained in:
thunder2 2025-07-21 15:04:57 +02:00
parent fad7774767
commit fce618f2aa
17 changed files with 66 additions and 48 deletions

View file

@ -59,6 +59,7 @@ CrashStackTrace gCrashStackTrace;
#include "util/rsdir.h"
#include "util/rstime.h"
#include "retroshare/rsinit.h"
#include "util/RsQtVersion.h"
#ifdef MESSENGER_WINDOW
#include "gui/MessengerWindow.h"
@ -136,7 +137,7 @@ static void showHelp(const argstream& as)
box.setWindowTitle(QObject::tr("Retroshare commandline arguments"));
// now compute the size of text and set the size of the box. For the record, this doesn't work...
box.setBaseSize( QSize(QFontMetricsF(font).width(text),QFontMetricsF(font).height()*text.count('\n')) );
box.setBaseSize( QSize(QFontMetrics_horizontalAdvance(QFontMetricsF(font), text),QFontMetricsF(font).height()*text.count('\n')) );
box.exec();
}