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

Richard Dale rdale at foton.es
Wed Dec 2 17:31:15 UTC 2009


On Wednesday 02 December 2009 05:16:00 pm 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. :)
But have you tried Wt::Ruby which is a 'QtRuby for web apps'? See 
http://github.com/rdale/wtruby/

I haven't done anything to it for a while, but the project isn't dead and I'm 
keen to get it working with Arno's new smoke generator as soon as I have time. 
Maybe it is possible to do something similar to what Declan has done with 
QtRuby and the Rails generators, but with Wt::Ruby instead?

-- Richard



More information about the Kde-bindings mailing list