LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-07-2007, 06:16 AM   #1
Ephracis
Senior Member
 
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109

Rep: Reputation: 50
Qt: Partial painting of QGraphicsItem


I am looking for a way to paint only a part of my custom QGraphicsItem. For example only paint from 0 to 10 on the x-axis and 0 to 15 on the y-axis.

Sounds pretty easy but I can't find it anywhere.. and I get no response on the Qt forums. :/
 
Old 10-09-2007, 12:55 PM   #2
Ephracis
Senior Member
 
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109

Original Poster
Rep: Reputation: 50
SOLUTION:

When I reimplement the paint() function of the QGraphicsItem I just call:
QPainter::setClipPath() before I do any painting. Easy!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora 7 turns screen into a `dark oil painting` ArchAngeL13 Fedora 2 06-16-2007 03:34 PM
java JPanel not painting it's graphics context linuxmandrake Programming 3 04-11-2006 08:30 AM
Natural painting for Linux auricle Linux - Software 2 11-06-2005 05:55 PM
ok this is really wierd - java painting titanium_geek Programming 11 01-01-2004 11:43 AM
GIMP + painting white transparent C++freak Linux - Software 2 07-23-2003 05:46 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration