Results 1 to 6 of 6

Thread: Accessing Individual Elements of QwtLegend

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2012
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    1

    Default Accessing Individual Elements of QwtLegend

    Hello,

    I am new to Qwt and Qt and require using Qwt to draw a minimum of 15 plots, however I needed to fix the size of the qwtplot. Setting the size of the qwtplot does not adjust the size of the legend. The large number of plots thus results in a large legend accompanied by a scrollbar which is undesirable. Setting the font size of the legend items also does not solve the issue. I would like to know how to access individual legend items in order to set their spacing to zero. Converting the legend to a list like:

    QList<QWidget*> this->legend()->legendItems(), gives a list of QWidgets and not QwtLegendItems and hence I cannot use the method setSpacing to set their spacing.

    I would further like to access individual legendItems to use their signals (clicked()) in order to highlight individual plots. Both of these problems can be solved if I would know how to access the legendItems.

    Please do help me out.
    Last edited by kedar; 26th September 2012 at 02:54.

Similar Threads

  1. Accessing complete QWebFrame document tree, not just elements
    By TimShnaider in forum Qt Programming
    Replies: 1
    Last Post: 2nd November 2012, 03:37
  2. Accessing elements of a svg file
    By Hogwarts in forum Qt Programming
    Replies: 2
    Last Post: 22nd February 2011, 14:00
  3. accessing table elements in Qt
    By awanish_jmi in forum Newbie
    Replies: 5
    Last Post: 28th July 2008, 12:51
  4. dealing individual objects
    By kingslee in forum General Programming
    Replies: 9
    Last Post: 15th November 2006, 01:28
  5. accessing gui elements from parent
    By chemstar in forum Qt Programming
    Replies: 3
    Last Post: 21st May 2006, 11:22

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
  •  
Qt is a trademark of The Qt Company.