天天看点

Qt Creator 模块学习 —— 坐标系统Qt Creator 模块学习 —— 坐标系统

Qt Creator 模块学习 —— 坐标系统

对于坐标来说,有以下特点:

1.对于父窗口(主窗口),坐标系统相对于屏幕,子窗口对应于父窗口

2.原点屏幕左上角

3.x往右递增

4.y往下递增

move(0,0);
    QPushButton *a = new QPushButton(this);
    a->move(100,100);//位置
    a->setText("^_^");//样式
    a->resize(100,100);//大小
           

大家可以自行试试。

继续阅读