User:Declan.mcgrath: Difference between revisions

From KDE TechBase
mNo edit summary
(Added draft article on Qt widgets vs KDE widgets)
 
(54 intermediate revisions by the same user not shown)
Line 1: Line 1:
Developing Ruby QT Applications using QT Designer and Ruby on Ubuntu
= Published Articles  =


<br>
;[[Development/Tutorials/Developing Qt4 Applications using Qt Designer and Ruby on Kubuntu|Developing Qt4 Applications using Qt Designer and Ruby on Kubuntu]]
:''Tutorial that shows how to design a simple User Interface in Qt Designer and then use the resulting widget in a Qt Ruby application we build from scratch.''


These instructions are tested with Ubuntu Jaunty Jackalope 9.04 .<br>  
= <br> Draft Articles  =


<br>


== Install the appropriate packages  ==


From a command line terminal run<br>  
;[[Development/Tutorials/Quickstart Guide to the Wikitext syntax used in KDE Techbase|Quickstart Guide to the Wikitext syntax used in KDE Techbase]]
;<br>


*sudo aptitude install libkorundum4-ruby1.8<br>
;[[Development/Tutorials/Deploying Qt Ruby Applications as a Debian packages for Kubuntu|Deploying Qt Ruby Applications as a Debian packages for Kubuntu]]
*sudo aptitude qt4-designer<br>
*sudo aptitude libqt4-ruby1.8-dev<br>
*sudo aptitude install libqt4-ruby1.8-examples<br>
*sudo aptitude install qt4-doc qt4-doc-html&nbsp; qt4-demos<br>
*sudo aptitude install qt-creator (you may not need this)<br>


<br>
Q. What is the difference between writing a Qt application and KDE application?
 
A. Qt targets multiple platforms and it's widgets provide only functionality that is available on all target platforms. KDE widgets are specialised for the KDE desktop, thus KDE takes a Qt widget and enhances it for the KDE environment. For example, a QDropdownBox might not provide auto-completion because only some target Qt platforms support it - whereas the KDE version will include this functionality in a KDialog (TODO: Get a specific correct example). Additionally KDE contains components for networking, displaying and file system abstraction which would not be available in Qt. If your program needs to run on on platforms other than KDE then you will need to use Qt widgets - if it's KDE you're focused on then go with a KDE application and KDE widgets.
= Create a simple Form with QT4 Designer<br>  =
 
*Create a folder on disk for your project, for example, my_first_project
*Start up QT4 Designer<br>
 
#Select QT 4 Designer from the Applications-&gt;Programming menu or...<br>
#From a command line terminal run: designer-qt4<br>
 
*The default form is a Dialog with Buttons Right. Stick with that and click Create<br>
*Drag a List View from the Item Widgets (Item-Based) selection of widgets on the left onto the form. Be careful NOT&nbsp;to choose the List View from the Item Widgets (Model-Based)<br>
*Right-click the List View that is now dragged on the form<br>
 
#Select Edit Items<br>
#Click the green plus icon on the left to add an item<br>
#Enter the text:&nbsp;First line<br>
#Click the green plus icon on the left to add an item
#Enter the text: Second line
 
*Save what we've done by selecting Save As in the File Menu
 
#Choose the filename dashboard.ui for your file and click save
#This file contains and XML representation of the form you just created<br>
 
*If you want to take a quick look at your form select Preview from the Form menu<br>
*But we're done with GUI stuff now! Let's get hacking...
 
<br>

Latest revision as of 14:51, 7 February 2010

Published Articles

Developing Qt4 Applications using Qt Designer and Ruby on Kubuntu
Tutorial that shows how to design a simple User Interface in Qt Designer and then use the resulting widget in a Qt Ruby application we build from scratch.


Draft Articles

Quickstart Guide to the Wikitext syntax used in KDE Techbase

Deploying Qt Ruby Applications as a Debian packages for Kubuntu

Q. What is the difference between writing a Qt application and KDE application? A. Qt targets multiple platforms and it's widgets provide only functionality that is available on all target platforms. KDE widgets are specialised for the KDE desktop, thus KDE takes a Qt widget and enhances it for the KDE environment. For example, a QDropdownBox might not provide auto-completion because only some target Qt platforms support it - whereas the KDE version will include this functionality in a KDialog (TODO: Get a specific correct example). Additionally KDE contains components for networking, displaying and file system abstraction which would not be available in Qt. If your program needs to run on on platforms other than KDE then you will need to use Qt widgets - if it's KDE you're focused on then go with a KDE application and KDE widgets.