[Qt-interest] [Fwd: Widget/window resize problem]

Stefano Rosellini s.rosellini at iv-srl.it
Thu May 14 14:45:03 CEST 2009


No one?

--- Original message ---

I to all.
I'm using qtermwidget in my application. I need to always have 80 rows
and 24 columns. When I press a toolbutton to enlarge or reduce fonts,
the window should adapt to new terminal widget size and when I resize
the window with mouse, the terminal widget must adapt it's font. Another
complication is that qtermwidget is in a folder that is the central
widget of a mainwindow.
I tried different approaches but I'm not able to get it working
correctly. With setFixedSize on qtermwidget the window resize well but I
can't resize it down.

I prepared a little project substituting qtermwidget with a TestWidget
(the red one) that let you resize only with steps of 100 pixels.
Given that:
  1. Test widget (the red one) must always have 'width=height' and size
should be a multiple of 100 (this to simulate font size gap).
I want this:
  1. Folder (the yellow one) must always be exactly sized to contain test
widget with no waste.
  2. MainWindow must always be exactly sized to contain folder with no 
waste.
  3. Using toolbuttons "+" and "-" red widget must increment/decrement it
size (preserving rules 1 and 2 above).
  4. Resizing mainwindow, the red widget should resize accordingly
(preserving rules 1 and 2 above -> stepping resize).

I think that must exist a simple solution but I'm not able to find it.
Does someone can help me in getting this works?
Thanks.

Stefano Rosellini
Informatica Valdinievole


-------------- next part --------------
A non-text attachment was scrubbed...
Name: resize.zip
Type: application/zip
Size: 2978 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090514/c1b77c4f/attachment.zip 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Parte allegato al messaggio
Url: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090514/c1b77c4f/attachment.pl 


More information about the Qt-interest-old mailing list