我正在做一个需要 2 个常量的项目:
Minimum Size of application (Width, Height)
Initial Size of application (Width, Height)
我想知道哪个会占用更少的内存:
1- One QSize (which the variable would contain the initial width and height and the minimum being scaled of this QSize)
2- 4 ints (MinH, MinW, IniH, IniW)
感谢您的建议!
最佳答案
代码:
std::cout << "QSize: " << sizeof(QSize) << std::endl;
输出:
QSize: 8
你算一下。
关于c++ - QSize 与使用 2 Int 有常量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8594127/