added qt 5.13 compatibility

This commit is contained in:
itsmattkc
2019-07-06 21:17:03 -05:00
parent 3038af3482
commit f32d1d2c85
@@ -61,7 +61,13 @@ void ProjectExplorerIconViewItemDelegate::paint(QPainter *painter, const QStyleO
painter->setPen(text_fgcolor);
QString duration_str = index.data(Qt::UserRole).toString();
#if QT_VERSION < QT_VERSION_CHECK(5, 11, 0)
int timecode_width = fm.width(duration_str);
#else
int timecode_width = fm.horizontalAdvance(duration_str);
#endif
int max_name_width = option.rect.width();
if (timecode_width < option.rect.width() / 2) {