Search Options
close
Search the following clips:
All Clips
Everyone's Clips
My Guides
Sign Up
Install
Learn More
Login
Generate codes from Qt designer ui file
ottolin
follow
0
11-29-2007 9:20 AM
741 views
tags:
programming
Add a Comment
Login
to Comment. Not a member yet?
Sign up
Today's Top Clips
A Christmas Memory I Could Do Without
Yes, I Am My Brother's Keeper.
Heroic Squirrel Saves It's Baby From Dog
How can a country be this beautiful???
Traveling by Reindeer
Winter wonderland
Elfs
December 25th
"Numberless multitude of people, of whom no one was close, no one was distant. …" —War and Peace
At Last! Proof of Creationism!
visit the
Top Clips page
View the Top Clips from
November 29, 2007
Embed This Clip In Your Site...
<div style="margin: 12px 0px; font-family: arial; color: #333333; background: #ffffff; border: solid 4px #e5e5e5; width: 100%; clear: left;"><div class="CM_CTB_Content_Wrap" style="margin: 0px; padding: 0px;background-color: #ffffff;"><div style="border-bottom: solid 1px #dcdcdc; white-space: nowrap; margin-bottom: 8px; background-color: #eeeeee ;background-image: url(http://clipmarks.com/images/source-bg.gif); background-repeat: repeat-x; height: 24px; line-height: 24px; vertical-align: middle; padding-bottom: 4px; color: #666666; font-size: 10px;" ><a href="http://clipmarks.com/clip-to-blog/" title="see clips that are hot right now"><img src="http://content.clipmarks.com/blog_embed/87f447f7-eff7-4e9c-9590-6748cdbd37f1/4F09E22A-E79A-4B5E-97F1-D7575E55DA78/" alt="" width="19" height="19" border="0" style="vertical-align: middle; margin: 0px 4px; display: inline; border: none; float:none;" /></a>clipped from <a title="http://moto.debian.org.tw/viewtopic.php?p=41132" href="http://moto.debian.org.tw/viewtopic.php?p=41132" style="font-size: 11px;">moto.debian.org.tw</a></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://moto.debian.org.tw/viewtopic.php?p=41132"> 下面分享一個簡易的方法,來模擬用 QT Designer 設計出一個 .ui 之後,如何以最少的手動 coding ,完成一個簡易的 QT Application。(以下假設所有相關環境變數及所需工具程式均設定及安裝完成) <BR /><DIV> 1. 使用 QT Designer 設計一個 Dialog(其他的亦可,這裡只是舉例說明),存到 D:\MyQTDialog\MyQTDialog.ui </DIV> <BR /><DIV> 2. 使用 command prompt ,切換到 D:\MyQTDialog 底下,以 "uic -o MyQTDialog.h MyQTDialog.ui" 產生 MyQTDialog.h。 </DIV> <BR /><DIV> 3. 參考 <A target="_blank" href="http://doc.trolltech.com/4.0/porting4-designer.html" linkindex="45">http://doc.trolltech.com/4.0/porting4-designer.html</A> 中 "There are two ways to create an instance of our form..."這一段,這裡使用第一種方法,新增了 main.cpp ,將 main function 寫在其中。 </DIV> <BR /><DIV> 4. 如果有與 QT 4 整合的 IDE 的話,此時應該可以直接編譯並產生出執行檔了。若無,則可參以下。同樣在 D:\MyQTDialog 底下,以 "qmake -project" 產生 MyQTDialog.pro 檔案。 </DIV> <BR /><DIV> 5. 使用 "qmake MyQTDialog.pro" 產生相關的 Makefile。 </DIV> <BR /><DIV> 6. "make" </DIV> <BR /><DIV> 7. 大公告成</DIV></blockquote></div><div style="margin: 0px 6px 6px 4px;"><table style="font-size: 11px;border-spacing: 0px;padding: 0px;" cellpadding="0" cellspacing="0" width="100%"><tr><td style="background:transparent;border-width:0px;padding:0px;"> </td><td align="right" style="background:transparent;border-width:0px;padding:0px;width:107px" width="107"><a href="http://clipmarks.com/share/4F09E22A-E79A-4B5E-97F1-D7575E55DA78/blog/" title="blog or email this clip"><img src="http://content6.clipmarks.com/images/c2b-foot.png" border="0" alt="blog it" width="107" height="17" style="border-width:0px;padding:0px;margin:0px;" /></a></td></tr></table></div></div>
New from the makers of Clipmarks:
Amplify.com - Don't just share the news...Amplify it!
Clipmarks
Home
New Clips
Top Clips
Dashboard
Popular Topics
News
Life
Science
Technology
Entertainment
Get Started
Sign Up
Install Clipping Tool
How Clipping Works
Clip-to-Blog™
ClipSearch
Tools and Resources
FAQ
ClipWeek
Top Clippers
Top Tags
Site Map
About Clipmarks
About Us
Contact
Copyright
Privacy
EULA
OK