Qt Widget Pos - Qt空间位置
来源:互联网 发布:java代码动态分析工具 编辑:程序博客网 时间:2024/05/19 16:06
To get Qt widget position,we can call function such as:
geometry(),pos(),x(),y(),width(),height()
The difference between geometry() with pos(),x(),y(),width(),height() below:
when we call geometry(),this will return a QRect,it indicates the widget position exclude window frame,but size with them(designed in QtDesigner).
when we call x(),y(),they will return the widget x-coordinate and y-coordinate include window frame.
when we call pos(),this will return the widget position within its parent.
when we call width(),height(),exclude the window frame.
**
but pay attention:all these functions will return value relative to their parent,so,to QMainWindow,these functions will return its postion relative to the desktop,but to other sub-widgets ,these functions always return the value relative to their parent widget
**
the diagram below:
- Qt Widget Pos - Qt空间位置
- qt globalPos() 与pos()
- Qt中各个widget前后位置的设定
- Qt中各个widget前后位置的设置
- Qt中各个widget前后位置的设定
- Qt中各个widget前后位置的设置(转载)
- Qt中各个widget前后位置的设置
- Qt中各个widget前后位置的设置
- Qt中各个widget前后位置的设置
- Qt中各个widget前后位置的设定
- Qt中各个widget前后位置的设定(转)
- Qt中各个widget前后位置的设定(转)
- qt的pos()和globalpos()
- qt的pos()和globalpos()
- qt 坐标 pos globalPos()
- Qt嵌套Widget
- Qt widget background
- QT窗口:widget
- Python的易混地带
- AJAX = Asynchronous JavaScript and XML(异步的 JavaScript 和 XML)开学学习在了
- Algorithm 4th edition
- OpenCV和MFC的完美结合
- 字符串求反
- Qt Widget Pos - Qt空间位置
- Linux上Mysql数据库安装目录移动
- 进程 计算响应比
- 如何学会 600 多种编程语言
- AJAX XHR
- 验证OWI计数差异
- 建造者模式
- Oracle的优化器有两种优化方式
- 省赛热身赛之 K-Nice