Qt4: fix the 'qpluginwidget' test

Fixes #1015.
loader: fix the 'constrain_geometry()' function

Fixes #1014.