自定义内存分配池

This commit is contained in:
2026-07-29 18:08:57 +08:00
parent 18edce4838
commit 84c4082e82
18 changed files with 325 additions and 188 deletions
+3 -3
View File
@@ -4,7 +4,7 @@
#include "menu/BaseWidgetMenu.h"
#include <QScreen>
QVBoxLayout* create_vbox_layout(const QVector<QWidget*>& children, QWidget *parent){
QVBoxLayout* create_vbox_layout(const std::vector<QWidget*>& children, QWidget *parent){
auto ret = new QVBoxLayout(parent);
ret->setMargin(0);
ret->setSpacing(0);
@@ -15,7 +15,7 @@ QVBoxLayout* create_vbox_layout(const QVector<QWidget*>& children, QWidget *pare
return ret;
}
QHBoxLayout* create_hbox_layout(const QVector<QWidget*>& children, QWidget *parent){
QHBoxLayout* create_hbox_layout(const std::vector<QWidget*>& children, QWidget *parent){
auto ret = new QHBoxLayout(parent);
ret->setMargin(0);
ret->setSpacing(0);
@@ -42,7 +42,7 @@ QRect get_max_rect(const QRect& rect, double WHRate){
}
int calculate_optimal_font_size(const QVector<QString>& text_list, const QSize& space_size, const QFont& font) {
int calculate_optimal_font_size(const std::vector<QString>& text_list, const QSize& space_size, const QFont& font) {
int font_size = 1, textWidth, textHeight;
do {
textWidth = -1;