calin_iaru
21st February 2008, 09:46
I am debugging someone's code and I see a strange thing:
- when double click-ing on the icon, the iconview is re-created, each of the new items is positioned as before
- when pressing enter on an icon, the iconview is re-created, each of the new items is positioned as before and then the iconview is refreshed. The icons will expand to all the viewport space.
And here's the problem: both doubleClick and returnPressed signals are triggering the same function, but the result is different. The idea behind positioning the icons is to have them represent a 2D matrix. Their spatial presentation matters and I would need a mechanism that places the icons within a specified boundary.
- when double click-ing on the icon, the iconview is re-created, each of the new items is positioned as before
- when pressing enter on an icon, the iconview is re-created, each of the new items is positioned as before and then the iconview is refreshed. The icons will expand to all the viewport space.
And here's the problem: both doubleClick and returnPressed signals are triggering the same function, but the result is different. The idea behind positioning the icons is to have them represent a 2D matrix. Their spatial presentation matters and I would need a mechanism that places the icons within a specified boundary.