Using proper procedure for margins

Thanks to http://qt-project.org/doc/qt-4.8/layouts-flowlayout.html

Squashed some exceptions by defining an instance variable in the layout.

https://qt.gitorious.org/pyside/pyside-examples/source/060dca8e4b82f301dfb33a7182767eaf8ad3d024: