Fix Qt 6 deprecation warnings

This commit is contained in:
Alexander Babikov
2025-08-15 00:31:57 +05:00
parent bc3caa557f
commit d2509bd2ad
6 changed files with 40 additions and 0 deletions

View File

@@ -50,7 +50,11 @@ public:
SettingsModel(QObject *parent)
: QAbstractListModel(parent)
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
fontHeight = QFontMetrics(qApp->font()).height();
#else
fontHeight = QApplication::fontMetrics().height();
#endif
}
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;