[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyQt] Width() is whack.
From:       inhahe <inhahe () gmail ! com>
Date:       2015-05-31 21:45:11
Message-ID: CAPeSgWqOgxU3WAUAamXf-Bqfaw1+PkBoGcrwzr8Frz1LALL-bQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


I made a QSplitter, and I want to set the position of the splitter handle
such that the right-side widget is a fixed width and the left-side widget
takes all the rest of the available space (in the top portion of a
QVBoxLayout)

One way I tried to do this was to use setSizes and pass [x-y, y]  where x
is the width of the entire container widget (using width()) and y is the
size i want the right-side widget to be.

Apparently x turns out to be 640. Fine, except that it actually puts the
splitter handle in the same place (not in the middle, somewhere closer to
the right side) whether y is 100, 50, 30, etc.

So I tried getting the widths from the individual widgets on the left and
right of the splitter, and they're both 100.. even though together on the
screen they take up the entire width of the container.  Then, just for fun,
I use setSizes (as described above, using the width() of the container
widget) and get the widths of the left and right widgets again, and the
values are

[Attachment #5 (text/html)]

<div dir="ltr">I made a QSplitter, and I want to set the position of the splitter \
handle such that the right-side widget is a fixed width and the left-side widget \
takes all the rest of the available space (in the top portion of a \
QVBoxLayout)<div><br></div><div>One way I tried to do this was to use setSizes and \
pass [x-y, y]   where x is the width of the entire container widget (using width()) \
and y is the size i want the right-side widget to \
be.</div><div><br></div><div>Apparently x turns out to be 640. Fine, except that it \
actually puts the splitter handle in the same place (not in the middle, somewhere \
closer to the right side) whether y is 100, 50, 30, etc.</div><div><br></div><div>So \
I tried getting the widths from the individual widgets on the left and right of the \
splitter, and they&#39;re both 100.. even though together on the screen they take up \
the entire width of the container.   Then, just for fun, I use setSizes (as described \
above, using the width() of the container widget) and get the widths of the left and \
right widgets again, and the values are  </div></div>


[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic