##// END OF EJS Templates
Added size hint for the widget
Tero Ahola -
r29:1f6ecd9d10e9
parent child
Show More
@@ -29,13 +29,13 public:
29 29 QChart* m_chart;
30 30 };
31 31
32 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
32 ///////////////////////////////////////////////////////////////////////////////////////////////////
33 33
34 34 QChartWidget::QChartWidget(QWidget *parent) :
35 35 QWidget(parent),
36 36 d_ptr(new QChartWidgetPrivate(this))
37 37 {
38
38 setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
39 39 }
40 40
41 41 QChartWidget::~QChartWidget()
@@ -52,6 +52,11 void QChartWidget::resizeEvent(QResizeEvent *event)
52 52 QWidget::resizeEvent(event);
53 53 }
54 54
55 QSize QChartWidget::sizeHint() const
56 {
57 // TODO: calculate size hint based on contents?
58 return QSize(100, 100);
59 }
55 60
56 61 void QChartWidget::addSeries(QChartSeries* series)
57 62 {
@@ -19,6 +19,7 public:
19 19
20 20 //implement from QWidget
21 21 void resizeEvent(QResizeEvent *event);
22 QSize sizeHint() const;
22 23
23 24 void addSeries(QChartSeries* series);
24 25 protected:
General Comments 0
You need to be logged in to leave comments. Login now