摘要:
一般为了节省内存,一个unsigned char占8bit,分bit进行存储。存储时单个bit对外可以使用bool值,多个连续的bit可以使用unsigned char。 获取/设置单个bit值方法 获取/设置多个连续bit值方法 static bool getBitValue(unsigned c 阅读全文
2024年3月27日
2024年2月29日
摘要:
QDialog通过setWindowFlags(Qt::Dialog | Qt:: WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint); 可以在Windows下正常显示最大化最小化按钮,但是在Linux下不会显示。 解决方案: setWindow 阅读全文
2022年1月7日
摘要:
重载QPushButton的paintEvent(QPaintEvent *e) void paintEvent(QPaintEvent *e) { QPushButton::paintEvent(e); //设置画布 QPainter painter(this); //设置原点,默认原点为左上角 阅读全文