2 Attachment(s)
Differencies between Qt designer preview and ui file
I built window using Qt designer 4.3.2 and converted resulted ui file using pyuic4. But converted ui doesn't look like this showed by Qt designer preview. Below are two screenshots. One is from Qt designer and the second is resulting PyQt window. Why is this happening ?
Re: Differencies between Qt designer preview and ui file
please attach the images at the forum that your post stays consistent.
Seems like a bug in pyuic4, that the padding property in inline layouts is not transformed correctly. how does the generated h file look like?
1 Attachment(s)
Re: Differencies between Qt designer preview and ui file
Here is resulted py file.
Re: Differencies between Qt designer preview and ui file
it's like i thought, there are no setting for spacing or margin for the layouts. I guess you have altered them to 0 inside your splitters. If so, send that result with the original ui to the mailing list of pyqt, since that is no error of Qt rather in the python bindings.
Re: Differencies between Qt designer preview and ui file
So how can I lay the bottom listWidget properly ? Is there any workaround for this ?
Re: Differencies between Qt designer preview and ui file
you can set the spacing and margin by hand after you called the setupUi function. to get the layouts you can use QObject::findChild().
Re: Differencies between Qt designer preview and ui file
It seems your PyQt installation is older than your Qt installation and pyuic is lagging behind uic in terms of functionality. Try upgrading PyQt.
1 Attachment(s)
Re: Differencies between Qt designer preview and ui file
I think I'm doing something wrong :) I updated PyQt to 4.5.1 and tried this ui both in Linux and Windows. The problem still exists. Here's my ui file.
Re: Differencies between Qt designer preview and ui file
Ok, since you don't set explicit the margins and spacings for the layout, the designer and your app have obviously different default values for that.
So set the margins explicit in the designer (the name of the property is then bold; If already 0, change to 1 and back.)
Re: Differencies between Qt designer preview and ui file
Thanks! Everything works perfect right now.