PDA

View Full Version : how to create frozen footer row in QTableView?



413X
12th February 2014, 18:28
The comment in the source for QAbstractScrollArea::setViewportMargins() says this:

"Sets the margins around the scrolling area to \a left, \a top, \a
right and \a bottom. This is useful for applications such as
spreadsheets with "locked" rows and columns. The marginal space is
is left blank; put widgets in the unused area.

Note that this function is frequently called by QTreeView and
QTableView, so margins must be implemented by QAbstractScrollArea
subclasses. Also, if the subclasses are to be used in item views,
they should not call this function.

By default all margins are zero."

I was able to create the space for the frozen row by calling setViewportMargins, but I can't figure out how to place a control in that "unused area". I would like to just put a QTableWidget there and hide the headers and just make one row high. Does anyone know how to do this?

413X
13th February 2014, 15:28
Nevermind, I was able to place the widget in the space by calling setGeometry

hispeedsurfer
24th April 2014, 16:21
Hi,

can you tell me (example) how you resolved this?