@@ -278,6 +278,7 void tst_qpieseries::clickedSignal() | |||
|
278 | 278 | |
|
279 | 279 | // add series to the chart |
|
280 | 280 | QChartView view(new QChart()); |
|
281 | view.chart()->legend()->setVisible(false); | |
|
281 | 282 | view.resize(200, 200); |
|
282 | 283 | view.chart()->addSeries(series); |
|
283 | 284 | view.show(); |
@@ -285,7 +286,7 void tst_qpieseries::clickedSignal() | |||
|
285 | 286 | |
|
286 | 287 | // simulate clicks |
|
287 | 288 | // pie rectangle: QRectF(60,60 121x121) |
|
288 |
QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, QPoint(1 |
|
|
289 | QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, QPoint(146, 90)); // inside slice 1 | |
|
289 | 290 | TRY_COMPARE(clickSpy1.count(), 1); |
|
290 | 291 | QCOMPARE(qvariant_cast<QPieSlice*>(clickSpy1.at(0).at(0)), s1); |
|
291 | 292 | } |
@@ -301,6 +302,7 void tst_qpieseries::hoverSignal() | |||
|
301 | 302 | |
|
302 | 303 | // add series to the chart |
|
303 | 304 | QChartView view(new QChart()); |
|
305 | view.chart()->legend()->setVisible(false); | |
|
304 | 306 | view.resize(200, 200); |
|
305 | 307 | view.chart()->addSeries(series); |
|
306 | 308 | view.show(); |
@@ -207,6 +207,7 void tst_qpieslice::mouseClick() | |||
|
207 | 207 | |
|
208 | 208 | // add series to the chart |
|
209 | 209 | QChartView view(new QChart()); |
|
210 | view.chart()->legend()->setVisible(false); | |
|
210 | 211 | view.resize(200, 200); |
|
211 | 212 | view.chart()->addSeries(series); |
|
212 | 213 | view.show(); |
@@ -236,6 +237,7 void tst_qpieslice::mouseHover() | |||
|
236 | 237 | |
|
237 | 238 | // add series to the chart |
|
238 | 239 | QChartView view(new QChart()); |
|
240 | view.chart()->legend()->setVisible(false); | |
|
239 | 241 | view.resize(200, 200); |
|
240 | 242 | view.chart()->addSeries(series); |
|
241 | 243 | view.show(); |
General Comments 0
You need to be logged in to leave comments.
Login now