chart widget minimum size
This commit is contained in:
parent
a844518a4b
commit
3694ebdcde
@ -95,9 +95,7 @@ void ChartWidget::clear() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QSize ChartWidget::sizeHint() const {
|
QSize ChartWidget::sizeHint() const {
|
||||||
if (width() < minimumWidth() || height() < minimumHeight())
|
return QSize(600, 350);
|
||||||
return minimumSize();
|
|
||||||
return QSize(width(), height());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QPointF ChartWidget::pointToCoord(const point_t& point) {
|
QPointF ChartWidget::pointToCoord(const point_t& point) {
|
||||||
|
@ -86,6 +86,8 @@ void MainWindow::on_action_Add_triggered() {
|
|||||||
|
|
||||||
QListWidgetItem* item = new QListWidgetItem();
|
QListWidgetItem* item = new QListWidgetItem();
|
||||||
|
|
||||||
|
item->setSizeHint(chart->minimumSize());
|
||||||
|
|
||||||
ui->graphsListWidget->addItem(item);
|
ui->graphsListWidget->addItem(item);
|
||||||
ui->graphsListWidget->setItemWidget(item, chart);
|
ui->graphsListWidget->setItemWidget(item, chart);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user