471,325 Members | 1,423 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,325 software developers and data experts.

[PyQt] Help on resizing a custom widget

Ok, here's what's going on. I've just created a custom widget. it
works great. I'm having some trouble, however, figuring out how to
allow the said widget to resize. For example, when I throw the widget
into a new dialog (using Qt Designer), I want to be able to drag it
larger/smaller and have widget expand/shrink to that size. Right now,
I can drag the widget bigger/smaller all I want, but it doesn't
actually change size.

I'm pretty new to PyQt (and therefore, Qt), so I'm pretty sure that
the answer is a property that needs to be set somewhere. I'm just not
sure which one. So you know, I'm using Python 2.4.3 and PyQt 3.1.6.

Any help and suggestions would be appreciated. Thanks.

Aug 27 '07 #1
2 3295
On Monday 27 August 2007, sk*****@gmail.com wrote:
Ok, here's what's going on. I've just created a custom widget. it
works great. I'm having some trouble, however, figuring out how to
allow the said widget to resize. For example, when I throw the widget
into a new dialog (using Qt Designer), I want to be able to drag it
larger/smaller and have widget expand/shrink to that size. Right now,
I can drag the widget bigger/smaller all I want, but it doesn't
actually change size.

I'm pretty new to PyQt (and therefore, Qt), so I'm pretty sure that
the answer is a property that needs to be set somewhere. I'm just not
sure which one. So you know, I'm using Python 2.4.3 and PyQt 3.1.6.

Any help and suggestions would be appreciated. Thanks.
Probably best to start with the following...

http://doc.trolltech.com/4.3.0/layou...ets-in-layouts

Phil
Aug 27 '07 #2
On Aug 27, 4:40 pm, Phil Thompson <p...@riverbankcomputing.co.uk>
wrote:
On Monday 27 August 2007, skaw...@gmail.com wrote:
Ok, here's what's going on. I've just created a custom widget. it
works great. I'm having some trouble, however, figuring out how to
allow the said widget to resize. For example, when I throw the widget
into a new dialog (using Qt Designer), I want to be able to drag it
larger/smaller and have widget expand/shrink to that size. Right now,
I can drag the widget bigger/smaller all I want, but it doesn't
actually change size.
I'm pretty new to PyQt (and therefore, Qt), so I'm pretty sure that
the answer is a property that needs to be set somewhere. I'm just not
sure which one. So you know, I'm using Python 2.4.3 and PyQt 3.1.6.
Any help and suggestions would be appreciated. Thanks.

Probably best to start with the following...

http://doc.trolltech.com/4.3.0/layou...ets-in-layouts

Phil
Thanks for pointing me in the right direction. I'll take a look at it.

Aug 27 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

35 posts views Thread by Vamsi Mudrageda | last post: by
2 posts views Thread by Leif B. Kristensen | last post: by
4 posts views Thread by Adrian Casey | last post: by
10 posts views Thread by Peter | last post: by
1 post views Thread by Chump Wad | last post: by
3 posts views Thread by Fabio | last post: by
2 posts views Thread by gregarican | last post: by
5 posts views Thread by deacon.sweeney | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.