<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://maemo.octonezd.me/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=41.213.79.29</id>
	<title>Maemo Wiki Mirror - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://maemo.octonezd.me/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=41.213.79.29"/>
	<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php/Special:Contributions/41.213.79.29"/>
	<updated>2026-04-22T09:49:39Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=QtRuby&amp;diff=34786</id>
		<title>QtRuby</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=QtRuby&amp;diff=34786"/>
		<updated>2012-07-27T09:03:25Z</updated>

		<summary type="html">&lt;p&gt;41.213.79.29: /* Linux */ Corrected QtDesigner install command&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a quick start guide to getting into QtRuby application development. Follow the KDE link at the bottom to take this further than what I have written so far. There is good info in mikec&#039;s thread as well that pertains to QtDesigner. Please feel free to add to this guide. Also please feel free to package an optified version of libqt so we don&#039;t need to use Easy Debian.&lt;br /&gt;
&lt;br /&gt;
Extra special thanks to Qole for [[Easy Debian]]. None of this would be possible without him.&lt;br /&gt;
&lt;br /&gt;
I&#039;m sure I&#039;ve screwed something up so let me know in this [http://talk.maemo.org/showthread.php?t=49751 thread.]&lt;br /&gt;
&lt;br /&gt;
== Preperations ==&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
* Get QtDesigner&lt;br /&gt;
 sudo apt-get install libqt4-designer &lt;br /&gt;
* Get Qtruby and Ruby&lt;br /&gt;
 sudo apt-get install libqt4-ruby1.8&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
--Still need to test these directions on a win machine.  But I think this is right.&lt;br /&gt;
* Get QtDesigner from http://qt.nokia.com/downloads&lt;br /&gt;
* Get Ruby 1.87  from http://rubyinstaller.org&lt;br /&gt;
* Install QtRuby4 gem from a command prompt&lt;br /&gt;
 gem install qtruby4&lt;br /&gt;
&lt;br /&gt;
=== Mac ===&lt;br /&gt;
I&#039;m not sure what all is gonna be required. Read this maybe: http://osake.wordpress.com/2009/08/21/qt4-qtruby-mac-os-x/&lt;br /&gt;
&lt;br /&gt;
=== N900 ===&lt;br /&gt;
* Install Easy Debian (available in the [[extras]] repository)&lt;br /&gt;
* Install ibqt4-ruby1.8 under Easy Debian using [[Nokia N900|N900]] [[terminal]].&lt;br /&gt;
 debbie sudo apt-get install libqt4-ruby1.8&lt;br /&gt;
&lt;br /&gt;
== Your First App ==&lt;br /&gt;
=== QtDesigner ===&lt;br /&gt;
*Start QtDesigner:&lt;br /&gt;
It will open a window called “New Form”.&lt;br /&gt;
*Select Main Window.&lt;br /&gt;
*Change the Screen Size option to 800x400.&lt;br /&gt;
**It may not be possible to do this depending on what platform you are on.&lt;br /&gt;
**That&#039;s okay as we can change it later.&lt;br /&gt;
*Click Create.&lt;br /&gt;
&lt;br /&gt;
Our new form is created.  We can now add controls to it and adjust its properties.&lt;br /&gt;
&lt;br /&gt;
*Click the View menu at the top of QtDesigner.&lt;br /&gt;
*Check the Property Editor, Object Inspector and Widget Box if needed.&lt;br /&gt;
&lt;br /&gt;
On the right side of the screen we see the Object Inspector and the Property Editor.&lt;br /&gt;
You can click on any object in the Object Inspector and you will see that the Property Editor loads that object.&lt;br /&gt;
&lt;br /&gt;
*Select the Main Window in the Object Inspector.&lt;br /&gt;
*In the Property Editor window scroll down till you see “geometry”.&lt;br /&gt;
You can expand the “geometry” stub by clicking on the triangle to the left of it.&lt;br /&gt;
*Change the Width to 800 and the Height to 400 if necessary.&lt;br /&gt;
&lt;br /&gt;
We don&#039;t need the Menu Bar or Status Bar that are default on a Main Window form.&lt;br /&gt;
Let&#039;s remove them.&lt;br /&gt;
*In the Object Inspector right click on the “menu bar” object.&lt;br /&gt;
*Select “Remove Menu Bar”.&lt;br /&gt;
*In the Object Inspector right click on the “status bar” object.&lt;br /&gt;
*Select “Remove”.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s add a label to our form to display some text.&lt;br /&gt;
&lt;br /&gt;
On the left side of our screen is the Widget Box.&lt;br /&gt;
We can scroll through and pick widgets to add to our form.&lt;br /&gt;
*Drag the “Label” widget under the “Display Widgets” category onto the form.&lt;br /&gt;
&lt;br /&gt;
You will see a “TextLabel” with blue dots around it.&lt;br /&gt;
You can drag the blue dots around to resize it.&lt;br /&gt;
*Right click on the label and select “Change rich text”.&lt;br /&gt;
This gives you a WYSIWYG text editor.&lt;br /&gt;
*Type in “Hello World” (or whatever you like.)&lt;br /&gt;
*Click “Ok” when finished.&lt;br /&gt;
&lt;br /&gt;
In the Property Editor window adjust the geometry of the label to 800x400.&lt;br /&gt;
&lt;br /&gt;
Now our form is complete.&lt;br /&gt;
&lt;br /&gt;
Go to the File menu of QtDesigner and Save the form in a new directory somewhere.&lt;br /&gt;
Name the form dashboard_ui.ui&lt;br /&gt;
=== Rbuic ===&lt;br /&gt;
Now we need to translate the QtDesigner file into Ruby source code.&lt;br /&gt;
* In Windows drop to a command prompt.&lt;br /&gt;
**In linux open an xterm.&lt;br /&gt;
* Navigate to the directory you save the form in.&lt;br /&gt;
 rbuic4 -x dashboard_ui.ui -o dashboard_ui.rb&lt;br /&gt;
--note maybe just rbuic for windows.&lt;br /&gt;
&lt;br /&gt;
=== Testing the app ===&lt;br /&gt;
* From your apps directory type:&lt;br /&gt;
 ruby dashboard_ui.rb&lt;br /&gt;
or &lt;br /&gt;
 ruby1.8 dashboard_ui.rb&lt;br /&gt;
If all is well you will see your program appear.   Congratulations!&lt;br /&gt;
&lt;br /&gt;
=== Transfering it to the N900 ===&lt;br /&gt;
*Now copy dashboard_ui.rb to your N900  MyDocs folder.&lt;br /&gt;
-- add more directions here&lt;br /&gt;
 &lt;br /&gt;
=== Running your app on the N900 ===&lt;br /&gt;
*Open the Debian Chroot from your N900 programs menu.&lt;br /&gt;
 cd home/user/MyDocs&lt;br /&gt;
 ruby1.8 dashboard_ui.rb&lt;br /&gt;
&lt;br /&gt;
== Revising Your First App For Single Inheritance ==&lt;br /&gt;
Coming Soon.&lt;br /&gt;
We&#039;ll look at how to create a main.rb and subclass are ui to seperate the ui code from our program code.&lt;br /&gt;
&lt;br /&gt;
== Important Links ==&lt;br /&gt;
* [http://techbase.kde.org/Development/Tutorials/Developing_Qt4_Applications_using_Qt_Designer_and_Ruby_on_Kubuntu KDE QTRuby tutorial]&lt;br /&gt;
* [http://talk.maemo.org/showthread.php?t=43663 mikec&#039;s Python/QtDesigner thread]&lt;br /&gt;
* [[Easy_Debian|Easy Debian wiki page]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Qt]]&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>41.213.79.29</name></author>
	</entry>
</feed>