Very strange behavior of QWidget in Qt Designer
Hi everyone
I've encountered a strange error while working with Qt Designer and my custom widget. I have several widgets in a horizontal layout. Most of them are QPushButtons and some are my custom widgets. To cut the long story short here is a screenshot
http://ipicture.ru/uploads/080619/thumbs/urJ4agdVec.png
First of all its obvious that the widget (which I've replaced by the way with an empty QWidget) is not centred properly. When I try to set another minimal height to this widget it expands as if it had a strange padding.
Honestly I am confused :confused:
Re: Very strange behavior of QWidget in Qt Designer
Re: Very strange behavior of QWidget in Qt Designer
Are you using a custom widget plugin or just promoting?
PS. Don't use links to external sites but attach the image on this forum next time, please.
Re: Very strange behavior of QWidget in Qt Designer
Hi. I was waiting for a reply too long so I didn't check this thread :o
I'm using my custom widget as a plug-in. I thought that is obvious :o
Re: Very strange behavior of QWidget in Qt Designer
Well, after looking at the screenshot it's not so clear which is what. I guess QFilmOnSlider is the custom widget provided by a plugin. If it's not looking correct in the screenshot, how should it look like? Remember that we don't really know what you're implementing. Does the custom widget work properly in a layout? I mean, if you don't use Qt Designer but place the widget into a simple layout directly in code.
1 Attachment(s)
Re: Very strange behavior of QWidget in Qt Designer
Quote:
Originally Posted by
jpn
Well, after looking at the screenshot it's not so clear which is what.
My bad :o
Here it is.
Quote:
Originally Posted by
jpn
Does the custom widget work properly in a layout? I mean, if you don't use Qt Designer but place the widget into a simple layout directly in code.
Honestly I didn't try to do this outside the Designer
Re: Very strange behavior of QWidget in Qt Designer
Re: Very strange behavior of QWidget in Qt Designer
Honestly, I don't know what should I say, or what do you expect... :) Personally I would first assure that my custom widget works in layouts before even trying to integrate it to Qt Designer.
Re: Very strange behavior of QWidget in Qt Designer
Quote:
Originally Posted by
jpn
Personally I would first assure that my custom widget works in layouts before even trying to integrate it to Qt Designer.
How can I do that?
Re: Very strange behavior of QWidget in Qt Designer
Create a test app. Install a layout on the window and add different widgets to the layout (including your custom widgets) and check how it behaves when you resize the window.
1 Attachment(s)
Re: Very strange behavior of QWidget in Qt Designer
Damn I forgot when I place a simple plain widget to the layout it behaves the same :confused: