PDA

View Full Version : Very strange behavior of QWidget in Qt Designer



THRESHE
19th June 2008, 18:12
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 (http://ipicture.ru/Gallery/Viewfull/2651001.html)
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:

THRESHE
21st June 2008, 13:20
Any ideas ?? :o

jpn
28th June 2008, 12:12
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.

THRESHE
12th August 2008, 16:30
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

jpn
12th August 2008, 16:44
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.

THRESHE
12th August 2008, 17:05
Well, after looking at the screenshot it's not so clear which is what.

My bad :o
Here it is.

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

THRESHE
13th August 2008, 15:29
Where are you jpn ? :)

jpn
13th August 2008, 15:34
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.

THRESHE
13th August 2008, 16:46
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?

jpn
13th August 2008, 17:05
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.

THRESHE
13th August 2008, 17:19
Damn I forgot when I place a simple plain widget to the layout it behaves the same :confused: