473,241 Members | 1,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,241 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 3418
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

35
by: Vamsi Mudrageda | last post by:
I am kind of new to Python, and after trying and using wxPython, I found it kind of lacking in easy-to-read documentation, speed at loading, and GUI response-time. So I am looking for an another...
2
by: Leif B. Kristensen | last post by:
Can somebody point me to a quick example on how to display the result of an SQL query in a PyQt QListBox? I've googled in vain for this. regards, -- Leif Biberg Kristensen...
4
by: Adrian Casey | last post by:
I'm using a QTimer object to expire certain password protected GUI options in my application after 2 minutes. Currently, the timer is reset each time the user presses the 'OK' button. This is not...
10
by: Peter | last post by:
I want to draw some lines on a widget. This works ok, but when I want to redraw, the old lines are still there. How do I clear or refresh the widget, so I can draw a new set of lines? Code...
1
by: Chump Wad | last post by:
I will now die. I am too ignorant to make it work. 10.2.setEventCB.py segfaults for me. It is almost there, but it is not there. SoQt.init returns a string, which I can't use as the parent...
3
by: Fabio | last post by:
Hi all, I'm about to write an application, and I'd like to use PyQt, but before choosing this toolkit I would like to clarify some particular licensing issues; if some user has already touched...
2
by: gregarican | last post by:
I have an application I'm writing using PyQt. I'm trying to create the various windows by subclassing Qt objects. I have a subclassed QMainWindow as the parent, and then a series of subclassed...
5
by: deacon.sweeney | last post by:
Hi, I've been searching for a .resize()-like function to overload much like can be done for the delete window protocol as follows: toplevel.protocol("WM_DELETE_WINDOW", callback) I realize...
7
by: Alex Gusarov | last post by:
Hello, I have strong .NET background with C# and want to do some familiar things from it with Python, but don't know how. For example, I created form in qt designer with QCalendarWidget, translated...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.