Results 1 to 3 of 3

Thread: QwtPainter DrawRect

  1. #1
    Join Date
    Jun 2011
    Posts
    17
    Qt products
    Qt3
    Platforms
    MacOS X

    Default QwtPainter DrawRect

    I have never seen anything like this brought up before in previous threads so im not really sure where to start. So on my QwtPlot, I want to draw a rectangle along the very bottom of the plot below zero on the y-axis and it has to extend to the length of the x-axis. I've been messing around with the qwt painter class and the draw rect function but haven't had any luck getting a rectangle drawn on the plot anywhere.

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,309
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QwtPainter DrawRect

    See http://qwt.svn.sourceforge.net/viewv...75&view=markup.

    The Background item should be close enough to your situation to understand how to proceed.

    Uwe

  3. #3
    Join Date
    Jun 2011
    Posts
    17
    Qt products
    Qt3
    Platforms
    MacOS X

    Default Re: QwtPainter DrawRect

    Thank you very much I have it working exactly the way I planned it out now except one thing that I figured would be very trivial but is giving me some grief. I switched around the Background class code so that is would create one long rectangle extending from zero to the size of the axis and then smaller white rectangles overtop of some sections. Just to make it look a bit cleaner I want all the rectangles to have a thick black border around them. I have been looking at setting the QPainters pen thicker but it doesn't seem to have any effect. Any ideas?

Similar Threads

  1. Why drawRect() has different display?
    By stella1016 in forum Qt Programming
    Replies: 0
    Last Post: 13th April 2011, 15:48
  2. Threads and QwtPainter::drawText
    By AwDogsgo2Heaven in forum Qwt
    Replies: 1
    Last Post: 15th July 2009, 17:45
  3. Which is faster, drawRect(..) Or drawPath(..) ?
    By nileshsince1980 in forum Qt Programming
    Replies: 1
    Last Post: 18th November 2008, 09:26
  4. problem about drawRect
    By vql in forum Qt Programming
    Replies: 4
    Last Post: 29th April 2008, 02:07
  5. drawRect inside paintGL()
    By mickey in forum Newbie
    Replies: 16
    Last Post: 18th April 2006, 02:12

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.