made formal QtUtils class

This commit is contained in:
itsmattkc
2020-11-17 09:42:36 +11:00
parent 97a15f2c54
commit e2010dde83
19 changed files with 48 additions and 33 deletions
+9 -1
View File
@@ -22,7 +22,7 @@
OLIVE_NAMESPACE_ENTER
int QFontMetricsWidth(QFontMetrics fm, const QString& s) {
int QtUtils::QFontMetricsWidth(QFontMetrics fm, const QString& s) {
#if QT_VERSION < QT_VERSION_CHECK(5, 11, 0)
return fm.width(s);
#else
@@ -30,4 +30,12 @@ int QFontMetricsWidth(QFontMetrics fm, const QString& s) {
#endif
}
QFrame *QtUtils::CreateHorizontalLine()
{
QFrame* horizontal_line = new QFrame();
horizontal_line->setFrameShape(QFrame::HLine);
horizontal_line->setFrameShadow(QFrame::Sunken);
return horizontal_line;
}
OLIVE_NAMESPACE_EXIT