|
发表于 2005-6-29 14:26:18
|
显示全部楼层
Re: 如何把qt设计的界面添加到kdevelop做的工程里
[quote:591bc93a18="south2000"]1.我用Qt Designer3.3.3设计了一个界面,从而有了一个.ui,ui.h文件.
2.用kdevelop3.1.1新建了一个"Simple KDE Application"的工程,那么如何把qt做的那个界面ui,ui.h文件添加进去呢?
谢谢![/quote]
1.NEW
2.(在面板里先择)widget(.ui)
3.这后的就下一步就可以了
。
。
。
。
4.回到KDEVELOP面板在右边个automake 管理器中里找到.ui右建,用QT designer打开,
5. QT designer做完了工作和保存后,
[code:1]Here we start with the KDE simple project named SigCreate and the sigcreatedlg.ui that we have added in our project. In the Automake Manager, in the section sigcreate (Program in bin) you must have three files: sigcreatedlg.ui, sigcreate.cpp and main.cpp. The project must compile and give the main window as in picture 3 (creating.html).
As the sigcreate class is no use for us, we will remove it and use it for subclassing the sigcreatedlg.ui file. In the Automake Manager, right click on sigcreate.cpp and select Remove and a dialog pops up. Please check 'Also Remove it from disk'. Then do the same with sigcreate.h. This is the way to remove obsolete files from your project and the Makefile.am will be updated. Remember to run automake & friends and configure before compiling your project again. We will not do it right now because we will make other changes. We will now use the class name SigCreate for the subclass.
In the Automake Manager, in sigcreate (program in bin), right click on sigcreatedlg.ui and choose Subclass Widget... from the context menu that appears. Then fill in the subclass name which is SigCreate. Check the box: Reformat source and click on OK. Say No then about adding these files in cvs as we did not enable this in our project.[/code:1]
6.在KDEVELOP编绎工程,KDEVELOP就会根.moc的文件知.ui被修改过,就会重新生成.ui转化出来的.h,.cpp, |
|