[Qt-interest] Custom QTreeView header
Fabio Dago
fabio.dago at sir.to.it
Wed Jun 9 08:16:13 CEST 2010
Hi.
I'm trying to create a custom header for QTreeView.
The QHeaderView documentation says that using a delegate for custom
painting has no effect, so I subclass QHeaderView and reimplement
paintEvent()...
void MyHeaderView::paintEvent(QPaintEvent* e)
{
QPainter painter(this);
//...
//...
}
I dont't know why, but this doesn't work, and the QPainter contructor
outputs: " QPainter::begin: Paint device returned engine == 0, type: 1 "
What's wrong?
Thanks.
Fabio.
More information about the Qt-interest-old
mailing list