(1) Even fixed-size spacers do not seem to hold their sizes, but will still expand and contract depending on their mood, regardless of size hints and size policy. (2) I need to access all the functionality of the widget directly -- properties and functions.
About poit 1,I am not sure that a spacer SHOULD be able to be with constant size, since its agaist its purpose, but I am not sure about this.
I prety sure this can be acheaved with a spacer, but sometime you need to play around with the layout to get it right.
You could also use some other widget, maybe an empty qlabel as a spacer.
Or you can calculate your desired QLineEdit geometry and adjust programaticaly on its parent.