The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Custom paint events make me smile

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Caleb Tennis

Posts: 48
Nickname: ctennis
Registered: Sep, 2005

Caleb Tennis is a software developer for a small research and development company.
Custom paint events make me smile Posted: Oct 4, 2005 6:07 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Caleb Tennis.
Original Post: Custom paint events make me smile
Feed Title: Tarkblog
Feed URL: http://blog.casey-sweat.us/library/shared/happyUrl/fnf_msdn.asp?Redirect="http://blog.casey-sweat.us/404/default.asp"
Feed Description: Caleb's personal weblog about his experiences in life, langauges, and laughter.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Caleb Tennis
Latest Posts From Tarkblog

Advertisement
When creating our own QtRuby GUI widget, we can override the paintEvent method to make it look however we like: require 'Qt' class Smiley < Qt::Widget   def paintEvent(e)     p = Qt::Painter.new(self)     p.setPen(Qt::blue)     # Face     p.drawEllipse(0,0, width-2, height-2)     # Eyes     p.drawEllipse(width / 3, height / 4,10,10)     p.drawEllipse(width / 3 * 2, height / 4,10,10)     # Nose     p.drawEllipse(width / 2, height / 5 * 2, 10, 10)     # Mouth     p.drawArc(width/4, height [...]

Read: Custom paint events make me smile

Topic: Master, console, and servant Previous Topic   Next Topic Topic: LEDs make prettier applications

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use