[PyQt] I seem to need help with some basic stuff.. =P
inhahe
inhahe at gmail.com
Tue May 26 21:18:02 BST 2015
I create a QTabWidget, and add to it QVBoxLayout (if i don't do this it
seems that none of the things I add to the tab widget show up), and then I
add a QWidget to the QTabWidget, and to the QWidget I add a QHBoxLayout,
and to the QHBoxLayout I add a QTextEdit. I want to make the QTextEdit
span the whole main window from left to right, and then below it I want
another QTextEdit that also spans all the way horizontally but takes a lot
less room (a fixed amount) vertically.
I've tried looking at the documentation for both size policies and layouts,
and I can't really make heads or tails of it. I have no idea how to do
these things with those things. So instead I was going to setGeometry
directly (and also do this on resize events), so I was going to get the
geometry of the tab's QHBoxLayout and start off by subtract some from the
bottom to to set the bottom of my first QTextEdit, but when I call
QHBoxLayout.geometry().bottomRight(), I get (-1, -1). That doesn't seem to
help. What am I doing wrong / how do I do this?
Also, the QHBoxLayout puts a thin empty area all around the QTextEdit I add
between its edge and the edge of the main window. How do I get rid of that
empty area?
Thanks..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150526/ad76863b/attachment.html>
More information about the PyQt
mailing list