The QwtLegend widget is a tabular arrangement of cells, called legend items, which consist of a label, a line a symbol, and a key of type long as an identifier. The symbol is drawn on top of the line at the left side of the label. An item's property can be accessed using the item's index, which is independent of the key. The cells can be arranged in row or column order with setMaxRows or setMaxCols . Scrollbars are displayed automatically if the cells don't fit into the widget area.
Parameters int n max.
The setMaxCols and setMaxRows members determine in which order the cells are arranged in the table. If a maximum number of columns is set, the legend items will be arranged in rows from the left to the right, starting at the first row, and beginning a new row when the actual number of columns has reached that maximum. The number of rows is thereby unlimited. The default setting is a maximum of 5 columns with an unlimited number of rows. Note setMaxRows and setMaxCols are mutually exclusive.