Results 1 to 3 of 3

Thread: Custom QHeaderView in Qt 4.1.1

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2006
    Location
    Almaty/KAZAKHSTAN
    Posts
    6
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Custom QHeaderView in Qt 4.1.1

    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:
    Qt Code:
    1. class MyCustomDelegate : public QAbstractItemDelegate
    2. {
    3. ....
    4. public:
    5. void paint(...){
    6. doMyCustomPaint();
    7. }
    8. };
    9. ...
    10. // usage
    11. tableView->setModel(myModel);
    12. myCustomDelegate = new MyCustomDelegate(this);
    13. tableView->getHorizontalHeader()->setItemDelegate(myCustomDelegate);
    To copy to clipboard, switch view to plain text mode 
    But code above does not help. Have any idea?
    Attached Images Attached Images

Similar Threads

  1. Custom plugin for a layout
    By cocheci in forum Qt Tools
    Replies: 2
    Last Post: 12th June 2006, 18:36
  2. Replies: 4
    Last Post: 24th March 2006, 22:50
  3. Custom Qt dll name
    By tony007 in forum Installation and Deployment
    Replies: 2
    Last Post: 10th March 2006, 15:29
  4. Replies: 16
    Last Post: 7th March 2006, 15:57
  5. Replies: 4
    Last Post: 1st March 2006, 23:11

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.