Stefano Crocco
10/26/2008 7:23:00 PM
Alle Sunday 26 October 2008, Andrew Lepyokhin ha scritto:
> Ken Bloom wrote:
> > It's all about the QSystemTrayIcon class. Use the #hide and #show
> > methods
> > to hide it and make it reappear.
>
> Thank you, Ken, i started to get it, but here's a problem:
> t = Qt::SystemTrayIcon.new
> t.setIcon('icon.png')
> results in error:
> `method_missing': undefined method `setIcon' for #<Qt::SystemTrayIcon:
setIcon requires a Qt::Icon, not the name of the icon file. You can do this:
t.setIcon(Qt::Icon.new('icon.png'))
You can also write this in a more rubish way:
t.icon = Qt::Icon.new('icon.png')
Stefano