I want to add a widget in a QTableView by shifting the viewport a bit down. I tried using QAbstractScrollArea::setViewportMargins() in the constructor of QTableView but it doesn't seem to do anything. Any ideas?
I want to add a widget in a QTableView by shifting the viewport a bit down. I tried using QAbstractScrollArea::setViewportMargins() in the constructor of QTableView but it doesn't seem to do anything. Any ideas?
My GNU/Linux Blog:
http://funwithlinux.blogspot.com
just found this:
http://www.qtsoftware.com/developer/...entry&id=94559
so it means i can't change the margins in QTableView?Bug Description: setViewportMargins() has no effect on QTableView, when calling this function it does not visual change to the margins for the QTableView widget.
Answer:
QTableView manages the viewport margins itself, this is not something that the user should be able to set.
My GNU/Linux Blog:
http://funwithlinux.blogspot.com
Have you tried style sheets?
J-P Nurmi
Ya, i am using style sheets but i don't know if by using style sheets i can achieve what i want here.
My GNU/Linux Blog:
http://funwithlinux.blogspot.com
Does setContentsMargins() and getContentsMargins() and contentsRect() work?
My GNU/Linux Blog:
http://funwithlinux.blogspot.com
Have you seen if the bug was fixed in newer releases? If not, maybe you can use QTreeView instead?
doesn't seem to be fixed in the newer version too. I am using a workaround for now. Will see if i can use TreeView.
My GNU/Linux Blog:
http://funwithlinux.blogspot.com
Bookmarks