Tair
11th July 2006, 09:11
Hi guys!
I'm using Qt 4.1.1 and have come across an unsolvable (at least to me) problem:
Normally text in sections of horizontal header view are drawn horizontally.
The question is - how to make that text drawn vertically, i.e. rotated by 90 degree? (see the attachment picture)
I've tried this:
class MyCustomDelegate : public QAbstractItemDelegate
{
....
public:
void paint(...){
doMyCustomPaint();
}
};
...
// usage
tableView->setModel(myModel);
myCustomDelegate = new MyCustomDelegate(this);
tableView->getHorizontalHeader()->setItemDelegate(myCustomDelegate);
But code above does not help. Have any idea?
I'm using Qt 4.1.1 and have come across an unsolvable (at least to me) problem:
Normally text in sections of horizontal header view are drawn horizontally.
The question is - how to make that text drawn vertically, i.e. rotated by 90 degree? (see the attachment picture)
I've tried this:
class MyCustomDelegate : public QAbstractItemDelegate
{
....
public:
void paint(...){
doMyCustomPaint();
}
};
...
// usage
tableView->setModel(myModel);
myCustomDelegate = new MyCustomDelegate(this);
tableView->getHorizontalHeader()->setItemDelegate(myCustomDelegate);
But code above does not help. Have any idea?