Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
Examples to go with the qtonrails framework. What is qtonrails? It's currently a very early attempt at building a simple framework that would let a developer comfortable with Rails generate a runnable Qt4 project. Currently, this project is very very early days - it's a basic prototype. To put it bluntly - it's rougher than a lizard's tongue at the moment. We are still researching how we might approach the problem of using Qt4 on top of a Rails project. The actual qtonrails code is located in the qtonrails directory under vendor/plugins. What's working? * The project is basically a very simple Rails project with 1 model called Product - this has title and description attributes along with created_at and updated_at timestamps * The qtonrails aspect exists under the vendor/plugins directory called 'qtonrails' * From the qtonrails-examples/vendor/plugins/qtonrails directory you can - Launch a Qt4 sample app that we've prepared for you using ./script/run - Generate the a QTableModel (creates 2 files - one autogenerated, the other for adding handcrafted code) ./script/generate qmodel Product ../../../app/models/product.rb - Possibly most excitingly, generate a Qt Form using ./script/generate qform_1col Product ../../../app/models/product.rb Once you've generated your 1 column form, open it using Qt Designer (it's in vendor/plugins/qtonrails/app/qforms/product_qform.ui) References * A big thanks to Richard Dale for this blog post which formed the basis of this work at http://www.kdedevelopers.org/node/2670 TODO * Incorporate the improvements in this blog post http://www.kdedevelopers.org/node/2677 * Get feedback on how much of this approach is reasonable and how it can be done in a better way * Work on what generators might make sense and learn what the anatomy of a qtonrails project might be