自定义内存分配池
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user