Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > PyQt QGridLayout question

Reply
Thread Tools

PyQt QGridLayout question

 
 
Volker Lenhardt
Guest
Posts: n/a
 
      11-23-2005
Once again a maybe silly question, but I find no solution, neither in
the documentation nor in examples.

I have got some different layouts to change place by the help of a
QGridLayout in its parent widget. To make it nice I use row/col spacing
and stretch respectively as well as multicell widgets. There is no
problem if the layout next to come uses more rows and columns than the
former one. But if it is the other way round, the grid seems to take
those now unused rows and columns into account and uses more space than
expected.

Before changing to another layout I remove and delete all widgets within
the grid and set spacing and stretch of all used rows and columns to 0:

for c in self.gridContents.values():
self.grid.removeChild(c)
self.gridContents.clear()
for i in range(20):
self.grid.addColSpacing(i,0)
self.grid.addRowSpacing(i,0)
self.grid.setColStretch(i,0)
self.grid.setRowStretch(i,0)

Only if I do a total resection and remove the grid and the parent
widget, too, to set them up again, all is fine but for the flicker on
the screen. Is there a more convenient way? Remove rows/columns as can
be done in tables?

Best wishes
Volker

--
Volker Lenhardt
E-Mail: http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PyQt QScrollView/QGridLayout question Samir Grover Python 0 07-11-2008 10:57 PM
PyQt layout question: QScrollView and QGridLayout? Volker Lenhardt Python 5 11-19-2005 03:04 PM
Noob question on PyQt and Qt dusty Python 2 08-01-2004 08:32 PM
Updating PyQt widgets question Eric Williams Python 0 11-18-2003 04:55 PM
[PY GUI] interest function in python GUI(wxpython,pyqt) program.wxpython,pyqt ulysses Python 4 10-22-2003 03:28 PM



Advertisments