Results 1 to 2 of 2

Thread: QTableWidget and column selection

  1. #1
    Join Date
    Jan 2006
    Location
    Leiden, the Netherlands
    Posts
    43
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default QTableWidget and column selection

    Hello,

    If I have a QTableWidget. If I entered rows, I can select columns. However, if there are no rows, I don't get 'currentColumnChanged' messages from the itemselectionmodel and if I ask for myTable->currentColumn() I will receive -1. I want to be able to select columns (to be able to edit column properties in my app). Does anyone have a suggestion on how to make columns selectable when no rows are in the table?

    Best regards,
    Arthur

  2. #2
    Join Date
    Dec 2006
    Location
    Wuhan, China
    Posts
    14
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QTableWidget and column selection

    maybe you can use
    void QHeaderView::setClickable ( bool clickable )

Similar Threads

  1. QTableWidget stretch a column other than the last one
    By roleroz in forum Qt Programming
    Replies: 6
    Last Post: 4th February 2015, 06:35
  2. QTableWidget first column always visible
    By topino in forum Qt Programming
    Replies: 13
    Last Post: 30th December 2014, 08:06
  3. changing column width of QTableWidget
    By juliarg in forum Newbie
    Replies: 4
    Last Post: 22nd March 2007, 15:51
  4. Replies: 6
    Last Post: 13th October 2006, 14:40
  5. QTableWidget column and row sizes
    By Arthur in forum Qt Programming
    Replies: 4
    Last Post: 27th January 2006, 11:03

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.