Results 1 to 2 of 2

Thread: setHeaderData

  1. #1
    Join Date
    May 2009
    Location
    Gorontalo
    Posts
    200
    Thanks
    20
    Thanked 5 Times in 5 Posts
    Qt products
    Platforms
    Unix/X11 Windows

    Question setHeaderData

    How to set vertical header data for QSqlQueryModel ? If horizontal is fine

    model->setHeaderData(1, Qt::Horizontal, "Jam 11.30");
    model->setHeaderData(1, Qt::Vertical, "Jam 11.30");

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: setHeaderData

    These are the labels used by the QHeaderView when it is oriented vertically, i.e. labelling rows. This should work as-is.

    If you wanted vertical text rendered in the cells of your horizontalHeader() then I think you need to subclass QHeaderview to provide a method to set the text orientation, some new size hinting, and a new paint routine. You could look at the code of Hierarchical Header View for clues as to how this might be done.

Similar Threads

  1. [Qt4.5] MySql strange beheavior
    By tranfuga25s in forum Qt Programming
    Replies: 8
    Last Post: 7th May 2009, 21:52
  2. setHeaderData Qt:Vertical on QSqlTableModel
    By janus in forum Qt Programming
    Replies: 4
    Last Post: 10th August 2008, 10:53

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.