Ruby QT Hiding the mouse

I’m currently trying to build an application using Ruby with QT which
just shows output from a log with colors and logos etc. I would like to
hide the mouse cursor if possible.

I have managed to hide the cursor on the application using:

Start GUI

app =

widget =

set the cursor for the main area to blank.

widget.cursor =

Start the app


But I cannot do the same for a TextEdit Widget.

How do I go about hiding the cursor on a TextEdit widget?
Or is it possible to say hide the cursor for every widget in my

Alle Tuesday 09 December 2008, Michael Pope ha scritto:

How do I go about hiding the cursor on a TextEdit widget?
Or is it possible to say hide the cursor for every widget in my

Qt::Widget#cursor= changes the cursor only for the receiver widget (in
case, the instance of MyWidget), but not for its children or other
widget. To
change the cursor for all widget, you can use
Qt::Application.override_cursor=. This is the method which you use, for
example, to display a busy cursor (which, of course, should affect all
widget in the application, not just one).

However, in my opinion, hiding the cursor in a GUI application produces
unexpected behaviour for the user who is quite likely to spend some time
looking around the screen to find out where the arrow has gone. Are you
this is what you want?

I hope this helps


Sorry, I wanted to create a new post only by mistake I gave reply to
your post.
Sorry again.


I have to check the body of the email which is a html code, like the

Text1: Text2

I have to check that for “Text1” what “Text2” is shown, which can vary
for different reasons.

I managed to get the emails, to check the subject of the email to
identify the correct email, but I can’t get to resolve this problem
which I mentioned previously.

Thank you,

require 'net/pop'

pop ='smtp server name')
pop.start('user', 'parola')
if pop.mails.empty?
  puts 'No mail.'
  i = 0
  pop.each_mail do |m|
    puts sbj
    puts m.pop
    i += 1
  puts "#{pop.mails.size} mails popped."

not at all

On Tue, Dec 9, 2008 at 10:05 AM, Erika [email protected] wrote:

assuming that you have managed to pop your body into one string, what
about the following

ary = mail.scan( %r{(.?)} ).
map{ |ttext| ttext.scan( %r{(.
?)} )[0…1] }

And if you want to have a hash

Hash[ *ary.flatten ]

and if Text2 happens to be the key

Hash[ *{|x| x.reverse}.flatten ]

It would be a nice exercise for you to optimize the solution for that
last case :wink:


Il computer non è una macchina intelligente che aiuta le persone
stupide, anzi, è una macchina stupida che funziona solo nelle mani
delle persone intelligenti.
Computers are not smart to help stupid people, rather they are stupid
and will work only if taken care of by smart people.

Umberto Eco