View Single Post
Old 03-07-2011, 12:30 PM   #1
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
Posts: 1,274
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
Resizing tables in window

I'm using a table inside a window, and the width of the columns/table just isn't what I want it to be especially on resizing - I get space on the right of the table, e.g.

w = QWidget()
layout = QVBoxLayout(w)
w.setLayout(layout)
....
table_layout = QHBoxLayout()
layout.addLayout(table_layout)

table = ConfigTableWidget(w)
table_layout.addWidget(table)

I can set the default size of the window. I can resize the columns to match their contents. But I haven't figured out how to resize the table to fill the layout completely - preferably by expanding one or two of the columns to a larger size and not the others. I'd even like to calculate the default width of the window based on either a maximum size or the width of the table, but anything that gets it to look a bit better would help.

Any suggestions?
meme is offline   Reply With Quote