diff options
author | Michal Klocek <michal.klocek@digia.com> | 2012-08-27 12:10:41 +0300 |
---|---|---|
committer | Michal Klocek <michal.klocek@digia.com> | 2012-08-27 12:10:54 +0300 |
commit | d57474518199237f7f49a02e0c43e141cf855028 (patch) | |
tree | a8029de743214c15b07d4cc360a233aef0506785 /demos | |
parent | 13af3669dfff12406ecd555c961355ff90110d28 (diff) |
Compiltion fix for 4.7.2
Diffstat (limited to 'demos')
-rw-r--r-- | demos/chartviewer/window.cpp | 10 |
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); |