Results 1 to 2 of 2

Thread: Drawing curve legend

  1. #1
    Join Date
    Dec 2006
    Posts
    426
    Thanks
    8
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Drawing curve legend

    Hi,

    I need to create a legend item to show various curves on screen. I am thinking to use one single QGraphicsTextItem as it supports line break (\n), so I can create several line breaks to show different curves by their names, but I also need to draw a small segment of the curve in front of their names using the same pen to distinguish which curve is which.

    How can I draw a line segment in front of a text insider QGraphicsTextItem? Of course I also need a tab space for the line segment...

    Thanks...

  2. #2
    Join Date
    Oct 2009
    Location
    Mexico
    Posts
    77
    Thanks
    6
    Thanked 10 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Drawing curve legend

    maybe try to create a a QGraphicsText item as set the text using a HTML using the function QGraphicsTextItem::setHtml ()
    Last edited by ecanela; 16th February 2010 at 03:51.

Similar Threads

  1. Replies: 3
    Last Post: 22nd January 2010, 16:46
  2. Replies: 1
    Last Post: 22nd January 2010, 14:34
  3. Qwt Legend Parent
    By BlackFoXX in forum Qwt
    Replies: 1
    Last Post: 21st April 2009, 07:10
  4. Removing Legend
    By cnbp173 in forum Qwt
    Replies: 4
    Last Post: 23rd January 2009, 20:52
  5. Qwt Legend
    By maxpayne in forum Qwt
    Replies: 4
    Last Post: 15th October 2008, 17:17

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.