summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@digia.com>2012-08-27 12:10:41 +0300
committerMichal Klocek <michal.klocek@digia.com>2012-08-27 12:10:54 +0300
commitd57474518199237f7f49a02e0c43e141cf855028 (patch)
treea8029de743214c15b07d4cc360a233aef0506785 /demos
parent13af3669dfff12406ecd555c961355ff90110d28 (diff)
Compiltion fix for 4.7.2
Diffstat (limited to 'demos')
-rw-r--r--demos/chartviewer/window.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/demos/chartviewer/window.cpp b/demos/chartviewer/window.cpp
index 73f97164..cdbfc620 100644
--- a/demos/chartviewer/window.cpp
+++ b/demos/chartviewer/window.cpp
@@ -429,7 +429,15 @@ void Window::showMenu(QChart* qchart)
if (chosen) {
Chart* chart = (Chart *) chosen->data().value<void *>();
int index = m_chartHash[qchart];
- m_baseLayout->removeItem(qchart);
+ //not in 4.7.2 m_baseLayout->removeItem(qchart);
+ for(int i = 0 ; i < m_baseLayout->count();++i)
+ {
+ if(m_baseLayout->itemAt(i)==qchart){
+ m_baseLayout->removeAt(i);
+ break;
+ }
+ }
+
m_chartHash.remove(qchart);
QChart* newChart = chart->createChart(m_dataTable);
m_baseLayout->addItem(newChart, index / 3, index % 3);