dragonpilot - 基於 openpilot 的開源駕駛輔助系統
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
491 B

#pragma once
#include <QtWidgets>
inline void configFont(QPainter &p, QString family, int size, const QString &style) {
QFont f(family);
f.setPixelSize(size);
f.setStyleName(style);
p.setFont(f);
}
inline void clearLayout(QLayout* layout) {
while (QLayoutItem* item = layout->takeAt(0)) {
if (QWidget* widget = item->widget()) {
widget->deleteLater();
}
if (QLayout* childLayout = item->layout()) {
clearLayout(childLayout);
}
delete item;
}
}