Qt widgets
1,Qt部件Widgets--CheckWidgets,安置其他部件的Widgets,让用户选择数值的部件
选择部件---使用户能够从预定义的条目菜单中做出选择,combination
QListBox,QComboBox,列表组合框
QListBox列表框部件一般用于使用户从中选择一个或多个条目,条目通常为文本类型,也可以是位图
QComboBox *combobox;
combobox = new QComboBox(false,this);设置组合框是否为读写,部件父对象
2,部件布局--程序中合理安排部件使程序看起来美观,从而更容易使用
部件类
QGroupBox,QButtonGroup,QSplitter,QWidgetStack
3,QGroupBox用于在部件周围绘制一个框架,在框架的上端添加描述信息
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I. -I/opt/Qt5.4.1/5.4/gcc_64/include -I/opt/Qt5.4.1/5.4/gcc_64/include/QtWidgets -I/opt/Qt5.4.1/5.4/gcc_64/include/QtGui -I/opt/Qt5.4.1/5.4/gcc_64/include/QtCore -I. -I/opt/Qt5.4.1/5.4/gcc_64/mkspecs/linux-g++ -o box.o box.cpp
box.cpp: In constructor ‘MyMainWindow::MyMainWindow()’:
box.cpp:24:22: error: ‘AlignHCenter’ was not declared in this scope
label->setAlignment(AlignHCenter | AlignVCenter);
^
box.cpp:24:22: note: suggested alternative:
In file included from /opt/Qt5.4.1/5.4/gcc_64/include/QtCore/qbytearray.h:38:0,
from /opt/Qt5.4.1/5.4/gcc_64/include/QtCore/qstring.h:38,
from /opt/Qt5.4.1/5.4/gcc_64/include/QtCore/qcoreapplication.h:38,
from /opt/Qt5.4.1/5.4/gcc_64/include/QtWidgets/qapplication.h:37,
from /opt/Qt5.4.1/5.4/gcc_64/include/QtWidgets/QApplication:1,
from box.cpp:1:
/opt/Qt5.4.1/5.4/gcc_64/include/QtCore/qnamespace.h:232:9: note: ‘AlignHCenter’
AlignHCenter = 0x0004,
^
box.cpp:24:37: error: ‘AlignVCenter’ was not declared in this scope
label->setAlignment(AlignHCenter | AlignVCenter);
^
box.cpp:24:37: note: suggested alternative:
In file included from /opt/Qt5.4.1/5.4/gcc_64/include/QtCore/qbytearray.h:38:0,
from /opt/Qt5.4.1/5.4/gcc_64/include/QtCore/qstring.h:38,
from /opt/Qt5.4.1/5.4/gcc_64/include/QtCore/qcoreapplication.h:38,
from /opt/Qt5.4.1/5.4/gcc_64/include/QtWidgets/qapplication.h:37,
from /opt/Qt5.4.1/5.4/gcc_64/include/QtWidgets/QApplication:1,
from box.cpp:1:
/opt/Qt5.4.1/5.4/gcc_64/include/QtCore/qnamespace.h:239:9: note: ‘AlignVCenter’
AlignVCenter = 0x0080,
^
make: *** [box.o] Error 1
创建和放置分组框架,QGroupBox::setTitle("");设置分组框的标题
4,QButtonGroup与QGroupBox 相似,有一些布局按钮方面的特殊功能
QButtonGroup对象的最常用的方法是布置单线按钮,在QButtonGroup
setExclusibe()
5,QSplitter()拆分对象使用户能够通过拖动拆分器所提供的部件间的分割线控制子部件的大小
Qt widgets的更多相关文章
- QT5中的pro文件中为何要加入"QT += widgets"
在pro文件里写"QT+=widgets"表示引入QtWidget这个module,qmake在生成makefile的时候,会设置好include path 和 lib path, ...
- 【QT相关】Qt Widgets Module
Qt Widgets Module:提供了一些列UI元素. 使用: //头文件包含 #include <QtWidgets> //链接模式,在.pro文件中添加行: QT += widge ...
- Qt4项目迁移到Qt5问题:greaterThan(QT_MAJOR_VERSION, 4): QT += widgets .
文章来源:http://blog.csdn.net/ccf19881030/article/details/18220447 问题一:错误:C1083: 无法打开包括文件:"QApplica ...
- Qt Widgets、QML、Qt Quick的区别
Qt Widgets.QML.Qt Quick的区别 简述 看了之前关于 QML 的一些介绍,很多人难免会有一些疑惑: Q1:QML 和 Qt Quick 之间有什么区别? Q2:QtQuick 1. ...
- 【Qt官方例程学习笔记】Getting Started Programming with Qt Widgets
创建一个QApplication对象,用于管理应用程序资源,它对于任何使用了Qt Widgets的程序都必要的.对于没有使用Qt Widgets 的GUI应用,可以使用QGuiApplication代 ...
- Qt Widgets Application可执行程序发布方式
前言 写好的Qt程序想打包发布,之前按照Qt快速入门系列教程里的方法,直接选release,构建,之后找到exe,拷贝几个dll,然而报错如图: 后来找到教程:http://tieba.baidu.c ...
- 公布Qt Widgets桌面应用程序的方法
公布Qt Widgets桌面应用程序的方法 Qt是一款优秀的跨平台开发框架,它能够在桌面.移动平台以及嵌入式平台上执行.眼下Qt 5介绍程序公布的文章帖子比較少.大家又很想要知道怎样公布Qt应用程序, ...
- Declarative Widgets is a QML plugin that adds Qt Widgets support to QML
05.04.2018 Nathan Collins 8 comments FacebookTwitterGoogle+LinkedInEmail Declarative Widgets is a ...
- 发布Qt Widgets桌面应用程序的方法(自定义进程步骤,用QT Creator直接生成)
发布Qt Widgets桌面应用程序的方法 Qt是一款优秀的跨平台开发框架,它可以在桌面.移动平台以及嵌入式平台上运行.目前Qt 5介绍程序发布的文章帖子比较少.大家又非常想要知道如何发布Qt应用程序 ...
- 发布Qt Widgets桌面应用程序的方法
Qt是一款优秀的跨平台开发框架,它可以在桌面.移动平台以及嵌入式平台上运行.目前Qt 5介绍程序发布的文章帖子比较少.大家又非常想要知道如何发布Qt应用程序,于是我花了一点儿时间介绍一下如何发布Qt桌 ...
随机推荐
- Elevator(hdoj 1008)
Problem Description The highest building in our city has only one elevator. A request list is made u ...
- UVA 1599 Ideal Path (HDU 3760)
两次bfs: 第一次bfs逆向搜索,得到每个点到终点的最短距离,找出最短路:第二次bfs根据最短距离可以选择满足条件的最短路. 注意!碰到这种很大数据量的题目一定要记得用scanf,printf 输入 ...
- 组队练习赛(Regionals 2012, North America - East Central NA)
A.Babs' Box Boutique 给定n个盒子,每个盒子都有长宽高(任意两个盒子长宽高不完全相同),现在选盒子的任意两面,要求x1 <= x2 && y1 <= y ...
- Easy UI treegrid 分页实例
转自:http://www.jeasyuicn.com/jquery-easyui-treegird-page-processing.html
- HDOJ-1002 A + B Problem II (非负大整数相加)
http://acm.hdu.edu.cn/showproblem.php?pid=1002 输入的数都是正整数,比较好处理,注意进位. //非负大整数加法 # include <stdio.h ...
- python-django如何在sae中使用自带ImageField和FileField -django-上善若水小站
python-django如何在sae中使用自带ImageField和FileField -django-上善若水小站 python-django如何在sae中使用自带ImageField和FileF ...
- opengl笔记——旋转,一段代码的理解
重看:opengl笔记——OpenGL好资料备忘 在找到这段代码,对理解opengl旋转很有帮助 ... glPushMatrix(); // initialze ModelView matrix g ...
- MYSQL报Fatal error encountered during command execution.错误的解决方法
{MySql.Data.MySqlClient.MySqlException (0x80004005): Fatal error encountered during command executio ...
- Hibernate中load与get的区别
1.get()采用立即加载方式,而load()采用延迟加载; ①get()方法执行的时候,会立即向数据库发出查询语句;(查询顺序:内部缓存,数据库) ②load()方法返回的是一个代理(此代理中只有一 ...
- The executable was signed with invalid entitlements新设备run出现这个问题
出现这个问题一般是新手不熟悉开发者发布流程造成地 一定要安开发者流程一步一步走 这样就不会出错了 注意这几个地方地设置 1.