[PySide] (no subject)

Tim Roberts timr at probo.com
Wed May 24 22:24:58 CEST 2017


Bruno-Pierre Jobin wrote:
>
> I want to create a footer on a TableWidget so I'm trying to stack a
> single row QTableWidget (self.footer) on top of the original one
> (self.table). Right now, I can see both table using the
> setStackingMode(QStackedLayout.StackAll) but I'm unable to move the
> footer at the bottom of self.table. Any suggestion for this?

What are you actually trying to achieve here?  The stacking widget
stacks widgets on top of each other, like sheets in a ream of paper. 
Only the one on top is visible.

If you want the footer to always be at the bottom, perhaps you want to
add both of them to a QVBoxLayout, or even a grid.


> Also, I'm pretty sure there is a cleaner way to set flags to multiple
> table at once. Maybe a for loop that acts on a type of widget? Or I
> could also just make a list of those two tables a itterate through
> that list.. I'm thinking as I type.

You can certainly do something like:

    for table in self.table, self.footer:
        table.commonAttribute1()
        table.commonAttribute2()

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.




More information about the PySide mailing list