Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 5

Qt-interest Archive, March 2007
QGraphicsLineItem Pen/Brush question


Message 1 in thread

I believe the answer is no, however I thought Id ask to
be sure before recoding.

Id like to use a line with pen widths that are larger than
1 typically, like 50 or even 100.  This makes a very large
box, even like a rectangle.  The problem is (so to speak) that
Id like to be able to use a brush like pattern if its wide.
I know that QGraphicsRectItem allows me to do this, but
I thought Id ask to be sure that there's not a way to do it
somehow with a LineItem as well (which isnt too painful).

Thanks for the info,
Jeff

--
 [ signature omitted ] 

Message 2 in thread

Jeff Lacki wrote:
> I believe the answer is no, however I thought Id ask to
> be sure before recoding.
>   
Fear not! The answer is yes!

> Id like to use a line with pen widths that are larger than
> 1 typically, like 50 or even 100.  This makes a very large
> box, even like a rectangle.  The problem is (so to speak) that
> Id like to be able to use a brush like pattern if its wide.
>   
Look in assistant for:

QPen::setBrush(const QBrush&);

--Justin
begin:vcard
begin:vcard
fn:Justin Noel
n:Noel;Justin
org:ICS;Engineering
adr:;;54B Middlesex Trpk;Bedford;MA;01730;USA
email;internet:justin@xxxxxxx
title:Sr. Consulting Engineer / Certified Qt Instructor
tel;work:(617) 621-0060
url:http://www.ics.com
version:2.1
end:vcard


Message 3 in thread

> QPen::setBrush(const QBrush&);

Oh DUH, I should have known this already!  Sorry for the bandwidth.
Thanks Justin!

Jeff

--
 [ signature omitted ]