Re: [PyQt] Limit the height of a Layout
Thank you for your replay, but I'm doing everything by code, I try to simulate a form with QtDesigner but the genereted code is a mess. Regards, Jorge On 3 March 2010 01:37, dcassid...@mass.rr.com wrote: Are you using QtDesigner? You can set the min and max size for each widget, so I'd probably look at that. -- Regards, -Demetrius Cassidy starglider develop starglider@gmail.com wrote: = Hello, I'm a newby and I have a question: how can I limit the height of a QHBoxLayout? e.g.: There is a central widget with a QHBoxLayout that as two QTableWidget and I want to limit the size of the first QTableWidget to 300 points, but let the second QTableWidget grow until the limit of the screen. Thank you in advance for your help. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Limit the height of a Layout
starglider develop wrote: Thank you for your replay, but I'm doing everything by code, I try to simulate a form with QtDesigner but the genereted code is a mess. Have you tried QWidget.setMaximumHeight(int) ? Doug On 3 March 2010 01:37, dcassid...@mass.rr.com wrote: Are you using QtDesigner? You can set the min and max size for each widget, so I'd probably look at that. -- Regards, -Demetrius Cassidy starglider develop starglider@gmail.com wrote: = Hello, I'm a newby and I have a question: how can I limit the height of a QHBoxLayout? e.g.: There is a central widget with a QHBoxLayout that as two QTableWidget and I want to limit the size of the first QTableWidget to 300 points, but let the second QTableWidget grow until the limit of the screen. Thank you in advance for your help. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Limit the height of a Layout
It's generated code - it's not supposed to be pretty. All you do is import the gui code from your dialog class which is in a separate file. It keeps things clean and simple, and you won't have to start looking around APIs for stuff that QtDesigner does for you. On 3/3/2010 6:56 AM, starglider develop wrote: Thank you for your replay, but I'm doing everything by code, I try to simulate a form with QtDesigner but the genereted code is a mess. Regards, Jorge On 3 March 2010 01:37, dcassid...@mass.rr.com mailto:dcassid...@mass.rr.com wrote: Are you using QtDesigner? You can set the min and max size for each widget, so I'd probably look at that. -- Regards, -Demetrius Cassidy starglider develop starglider@gmail.com mailto:starglider@gmail.com wrote: = Hello, I'm a newby and I have a question: how can I limit the height of a QHBoxLayout? e.g.: There is a central widget with a QHBoxLayout that as two QTableWidget and I want to limit the size of the first QTableWidget to 300 points, but let the second QTableWidget grow until the limit of the screen. Thank you in advance for your help. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Limit the height of a Layout
You should be able to 'setMaximumHeight' you can also use the setSizePolicy and set the widgets size policy to what you want. And there is a method for QBoxLayout where you set the 'stretch factor' when you add a widget, so that certain widgets will stretch preferentially to others. Maybe you could make a short example of your layout and somebody will fix it. I find the layouts of Qt to be really convenient without resorting to the designer. But at the same time, now that I am more familiar with Qt, I use the designer to whip up some really quick examples. mbs ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Limit the height of a Layout
Hello, I'm a newby and I have a question: how can I limit the height of a QHBoxLayout? e.g.: There is a central widget with a QHBoxLayout that as two QTableWidget and I want to limit the size of the first QTableWidget to 300 points, but let the second QTableWidget grow until the limit of the screen. Thank you in advance for your help. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Limit the height of a Layout
Are you using QtDesigner? You can set the min and max size for each widget, so I'd probably look at that. -- Regards, -Demetrius Cassidy starglider develop starglider@gmail.com wrote: = Hello, I'm a newby and I have a question: how can I limit the height of a QHBoxLayout? e.g.: There is a central widget with a QHBoxLayout that as two QTableWidget and I want to limit the size of the first QTableWidget to 300 points, but let the second QTableWidget grow until the limit of the screen. Thank you in advance for your help. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt