当前位置: 首页> 游戏> 攻略 > oa系统包括哪些系统_个人网页设计模版_网络营销的特点_网络营销推广与策划

oa系统包括哪些系统_个人网页设计模版_网络营销的特点_网络营销推广与策划

时间:2025/7/12 16:13:49来源:https://blog.csdn.net/2301_80163789/article/details/146196978 浏览次数:1次
oa系统包括哪些系统_个人网页设计模版_网络营销的特点_网络营销推广与策划

水平布局QHBoxLayout

QHBoxLayout 是一种水平布局控件。

1. QHBoxLayout

属性说明
layoutLeftMargin左侧边距。
layoutRightMargin右侧边距。
layoutTopMargin顶部边距。
layoutBottomMargin底部边距。
layoutSpacing相邻元素间距。

2. QHBoxLayout方法

方法说明
addWidget把控件添加到布局管理器。
setLayout设置布局管理器到……(即设置到 widget 中或其他 layout 中)

3. 代码创建并使用QHBoxLayout管理多个控件

注意要将 QVBoxLayout 的父元素设置到 this 上,且 QVBoxLayout 头文件为 <QLayout>

#include "widget.h"
#include "ui_widget.h"
#include <QPushButton>
#include <QLayout>Widget::Widget(QWidget *parent): QWidget(parent), ui(new Ui::Widget)
{ui->setupUi(this);QPushButton* button1=new QPushButton("pushButton1");QPushButton* button2=new QPushButton("pushButton2");QPushButton* button3=new QPushButton("pushButton3");QHBoxLayout* layout=new QHBoxLayout(this);layout->addWidget(button1);layout->addWidget(button2);layout->addWidget(button3);
}Widget::~Widget()
{delete ui;
}

QHBoxLayout1

关键字:oa系统包括哪些系统_个人网页设计模版_网络营销的特点_网络营销推广与策划

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: