[Kde-bindings] Qt on Rails - Making the creation of simple Qt apps easier with Ruby

Declan McGrath declan at divilment.com
Wed Dec 2 17:25:32 UTC 2009


I totally agree with you Ian wrt to the confusing manner in which I've set it up. I just threw this together in a few hours on the train as a proof of concept.

I do plan to 'plugin'-ize it if it turns out to be something that is useful. I've not written a plugin before so I didn't want to waste time learning that when I really wanted to get Qt and Rails playing together.

My biggest concern is figuring out how to architect in a manner that's aesthically pleasing to Rails people and Qt people. And working out how to get things like views done in Qt Designer hooked in. More than anything I want to get the right decisions and conventions in there so that it is easy to use yet flexible.

Very early days yet. And I adore all feedback/contribution/ideas and help - especially on the Qt side because I'm not that experienced in putting a Qt app together.

Thanks for the feedback to date,
Declan


On Wednesday 02 December 2009 17:16:00 Ian Monroe wrote:
> On Wed, Dec 2, 2009 at 10:44 AM, Declan McGrath <declan at divilment.com> wrote:
> > On Monday 30 November 2009 16:02:36 Richard Dale wrote:
> >> On Sunday 29 November 2009 10:53:48 pm Declan McGrath wrote:
> >> > Hi folks,
> >> >
> >> > I'm a Ruby dev interested in qtruby. I'm looking at a way to create a
> >> >  Rails-style generator for building simple qtruby apps. I'm unsure of how
> >> >  transferable the Rails approach would be to building a Qt app but at a
> >> >  minimum I think it would a bit of instant gratification to a Rails dev if
> >> >  they could quickly see a qt version of their app running quickly.
> >> >
> >> > I've started a project to research this at
> >> >  http://github.com/theirishpenguin/qtonrails-examples
> >> >
> >> > If you pull down the code and follow the simple instructions in the README
> >> >  you should be able to see the Qt app running through a Rails backend (a
> >> >  SQLite db is bundled with it so you don't need to worry about generating a
> >> >  db or anything). My Qt skills are not all that, so I would appreciate any
> >> >  feedback on the direction I'm taking. I will be learning how to better to
> >> >  craft Qt apps over the next while but any pointers early on would be great
> >> >  (note the TODO list at the bottom of the README to avoid wasting your time
> >> >  on the few things I already am aware of such as blog post that implements
> >> >  a better approach to using Qt::AbstractTableModel).
> >> I got the code from the git repository, but I couldn't get it to run:
> >>
> >> $ ./script/generate qmodel Product ../../../app/models/product.rb
> >> Couldn't find 'qmodel' generator
> >
> > Hi Richard,
> >
> > I suspect you are running ./script/generate qmodel ... from the root of the qtonrails-examples app. Instead try running it from the vendor/plugins/qt directory (there is another script directory there!).
> >
> > Note that this will fail for out of the box because I already have included some pre-generated qmodels with the app. So delete everything under the qtonrails-examples/vendor/plugins/qt/app/qmodels directory before running the ./script/generate qmodel command again.
> 
> Wouldn't it make more sense to just package the whole thing as a ruby
> on rails plugin? Kind of confusing how you have it now.
> 
> I thought about doing something like this at a previous job. It would
> be a Ruby Qt app that would interface with a remote postgresql server.
> It would be sooo much nicer then having to make faux-widgets on a
> website for an internal database application. I was getting really
> sick of AJAX. :)
> 
> Ian
> 



More information about the Kde-bindings mailing list