On Tuesday, 3 July 2018 03:11:42 BST Frank Rueter | OHUfx wrote:
> Hi all,
> 
> I am having trouble controlling my table view’s column sizes.
> I thought implementing the delegate’s sizeHint was a way to do this but
> it won’t work for me.
> 
> Can somebody please point out what I’m missing?

You must also set an appropriate resize mode for the view.

Adding
`self.horizontalHeader().setSectionResizeMode(QtWidgets.QHeaderView.ResizeToContents)`

to MyView.__init__ should solve your problem.

See http://doc.qt.io/qt-5/qheaderview.html#ResizeMode-enum

-Francis


_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to