Results 1 to 4 of 4

Thread: Disable the Vertical and Horzontal header view

  1. #1
    Join Date
    Jan 2011
    Posts
    212
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    24

    Default Disable the Vertical and Horzontal header view

    Hello forum,


    I am going through the example of spinbox delegate when the QTableView is used.

    There i would like to disable both the vertical and horizontal view. Any hint?


    Regards
    Sajjad

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Wiki edits
    5

    Default Re: Disable the Vertical and Horzontal header view

    Quote Originally Posted by sajis997 View Post
    Any hint?
    Reading the docs.

    QTableView::horizontalHeader() and QWidget::hide().

  3. #3
    Join Date
    Jan 2011
    Posts
    212
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    24

    Default Re: Disable the Vertical and Horzontal header view

    Thanks for the hint.

    I am trying to create a 3-by-3 matrix editor using the spin box delegate. The procedure is described as follows:

    1. I have a separate Property class which holds the matrix value as linear array - float matVal[9];

    2. In the editor widget constructor, i have created the QStandardItemModel object , QTableView object, and populate the the model from the property .I
    hope it is the right manner.

    3. Whenever the value is changed in the editor , the delegate reflects that changes to the model through the delegate. But It has to be extendend to the Property class as well. Any hint on this ? Do i have to create signal and slot for this purpose?


    Looking forward to some suggestion


    Regards
    Sajjad

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

    Default Re: Disable the Vertical and Horzontal header view

    Have a think abut not using QStandardItemModel; write your own model (derive from QAbstractTableModel) that manipulates your value storage directly.

Similar Threads

  1. Vertical Header For QTreeView
    By wirasto in forum Qt-based Software
    Replies: 1
    Last Post: 12th October 2010, 06:53
  2. How to disable vertical scroll bar in QTableWidget
    By grsandeep85 in forum Qt Programming
    Replies: 2
    Last Post: 14th October 2009, 12:07
  3. No Sort Vertical Header
    By wirasto in forum Qt Programming
    Replies: 4
    Last Post: 1st July 2009, 11:54
  4. How to customize horizontal header (diagonal header view)
    By vairamuthu.g in forum Qt Programming
    Replies: 4
    Last Post: 4th September 2008, 16:59
  5. Replies: 3
    Last Post: 1st February 2008, 19:18

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.