1. 效果 2. 代码 QChartView* chartView = new QChartView(); chartView->setRubberBand(QChartView::RectangleRubberBand);