QT编程入门

how to use QT designer to design the UI program like MFC:

palt form:

OS:LINUX  AS4.0

QT:QT3.3-DEVEL

 ui tools:QTdesigner

complier :shell

step:

 1:open qt designer

2:like the MFC you can drag all of the widget on th toolbox

3:designe a UI like MFC then save it in a new folder

  eg: save form1.ui in folder /root/myworkfile/form1

4:come to the form1.ui folde

    shell: cd  /root/myworkfile/form1

   shell:uic -o form1.h form1.ui

    shell:uic -o form1.cpp -impl form1.h form1.ui

5:then in form1 folde you can see two c++ file  form1.h,foem1.cpp

6:make the c++ file into a qt project use the follow command

 shell:qmake -project

 7:get makefile use the follow command

shell:qmake

8:then you can comple you c++ program now

 shell:make

over all usr the QT designer to design QT program finished ,but using qt designer there have a sideeffect

the QT designer using the geometry to location a widget ,so when th frequence of you monitor changed

or the size of the QT program window changed ,the program form size can not changed with it ;

it keep it old size and location. 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值