librelist archives

« back to archive

Other Ruby GUI toolkits: qtruby

Other Ruby GUI toolkits: qtruby

From:
r4ito
Date:
2010-11-05 @ 17:02
Hey, just wanted to comment on this entry.  First, good job getting the 
application done, Qt does looks quite nice although there are a few things
that are still too C++ like. There's one thing that bothers me about the 
code, the fact that you have to create 11 labels (one for each element on 
the data) just to be 'safe' when you're not going to use all 11 (since an 
empty search returns right away), isn't possible to create them on the fly
inside the do_search like on the shoes version?, like:

label = Qt::Label.new(word)
@labels << label
@layout.addWidget(label)

and use removeItem() or destroy() to remove them first.
notice that I'm only guessing after reading these:
http://lists.trolltech.com/qt-interest/2005-01/thread00150-0.html
http://lists.trolltech.com/qt-interest/2005-03/thread00996-0.html

haven't been able to try myself, I tried to install qt but failed 
miserably  so I'm dropping my concern in case someone is willing to try.

anyway, looking forward to the next entry.


      

Re: [shoes] Other Ruby GUI toolkits: qtruby

From:
Steve Klabnik
Date:
2010-11-05 @ 17:25
It might be possible, and it would probably be slightly truer to the
Shoes version, you're right. I'll give it a shot and revise the post.
I was doing the simplest thing I could think of.

Re: [shoes] Other Ruby GUI toolkits: qtruby

From:
r4ito
Date:
2010-11-05 @ 19:58
Thanks for that, I'm really sorry I couldn't try for myself and had to bother you.

Anyway, I started messing with wxruby and I got the search example working
although I couldn't get the background color but the rest is working, but 
I'm quite happy with it being only 35 lines long with comments included, 
hope it helps.
http://pastie.org/1275678






      

Re: [shoes] Other Ruby GUI toolkits: qtruby

From:
Steve Klabnik
Date:
2010-11-05 @ 20:06
This is awesome, and super helpful. If you want to even write the wx
post, you can, but if not, I'll do it with your example and give you
credit.

Re: [shoes] Other Ruby GUI toolkits: qtruby

From:
r4ito
Date:
2010-11-05 @ 20:39
I'm glad you find it useful, still I'd prefer to let you write the post. 
If you use my example remember to add again "This may not be the most 
optimized code" lol 
But at least it gives a basic idea on how to work with wxruby.


      

Re: [shoes] Other Ruby GUI toolkits: qtruby

From:
Steve Klabnik
Date:
2010-11-05 @ 20:42
No worries, I just wanted to offer.

I will certainly add that in again, no worries. :)

You've saved me a few hours of work, thanks.

On Fri, Nov 5, 2010 at 4:39 PM, r4ito <r4ito@yahoo.com> wrote:
> I'm glad you find it useful, still I'd prefer to let you write the post.
If you use my example remember to add again "This may not be the most 
optimized code" lol
> But at least it gives a basic idea on how to work with wxruby.
>
>
>
>

Re: [shoes] Other Ruby GUI toolkits: qtruby

From:
ashbb
Date:
2010-11-06 @ 01:44
Using wxruby,..... will be another color Shoes? :-D

ashbb

Re: [shoes] Other Ruby GUI toolkits: qtruby

From:
Steve Klabnik
Date:
2010-11-06 @ 01:45
hahaha, I don't think so. We have so many as it is...