User:Declan.mcgrath: Difference between revisions

    From KDE TechBase
    mNo edit summary
    mNo edit summary
    Line 3: Line 3:
    <br>  
    <br>  


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


    <br>
    <br>  


    == Install the appropriate packages  ==
    == Install the appropriate packages  ==


    From a command line terminal run<br>
    From a command line terminal run<br>  


    *sudo aptitude install libkorundum4-ruby1.8<br>  
    *sudo aptitude install libkorundum4-ruby1.8<br>  
    Line 18: Line 18:
    *sudo aptitude install qt-creator (you may not need this)<br>
    *sudo aptitude install qt-creator (you may not need this)<br>


    <br>
    <br>  


    = Create a simple UI with QT4 Designer<br> =
    = 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>
    *Start up QT4 Designer<br>


    #Select QT 4 Designer from the Applications-&gt;Programming menu or...<br>
    #Select QT 4 Designer from the Applications-&gt;Programming menu or...<br>  
    #From a command line terminal run: designer-qt4<br>
    #From a command line terminal run: designer-qt4<br>


    *<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><br>


    <br>
    <br>

    Revision as of 05:11, 15 August 2009

    Developing Ruby QT Applications using QT Designer and Ruby on Ubuntu


    These instructions are tested with Ubuntu Jaunty Jackalope 9.04 .


    Install the appropriate packages

    From a command line terminal run

    • sudo aptitude install libkorundum4-ruby1.8
    • sudo aptitude qt4-designer
    • sudo aptitude libqt4-ruby1.8-dev
    • sudo aptitude install libqt4-ruby1.8-examples
    • sudo aptitude install qt4-doc qt4-doc-html  qt4-demos
    • sudo aptitude install qt-creator (you may not need this)


    Create a simple Form with QT4 Designer

    • Create a folder on disk for your project, for example, my_first_project
    • Start up QT4 Designer
    1. Select QT 4 Designer from the Applications->Programming menu or...
    2. From a command line terminal run: designer-qt4
    • The default form is a Dialog with Buttons Right. Stick with that and click Create
    • Drag a List View from the Item Widgets (Item-Based) selection of widgets on the left onto the form. Be careful NOT to choose the List View from the Item Widgets (Model-Based)
    • Right-click the List View that is now dragged on the form
    1. Select Edit Items
    2. Click the green plus icon on the left to add an item
    3. Enter the text: First line
    4. Click the green plus icon on the left to add an item
    5. Enter the text: Second line
    • Save what we've done by selecting Save As in the File Menu
    1. Choose the filename dashboard.ui for your file and click save
    2. This file contains and XML representation of the form you just created