Results 1 to 2 of 2

Thread: How to make a QTableWidgetItem UnSelectable?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Feb 2010
    Location
    Wokingham, United Kingdom
    Posts
    36
    Thanks
    7
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to make a QTableWidgetItem UnSelectable?

    try setting the item flags before you put the item into the QTableWidget i.e.
    Qt Code:
    1. QTableWidgetItem *item = new QTableWidgetItem("item text");
    2. item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
    3. ui->tablewidget->setItem(row, col, item);
    To copy to clipboard, switch view to plain text mode 

    hope that works
    Last edited by janorcutt; 5th January 2011 at 11:48.

Similar Threads

  1. Replies: 6
    Last Post: 10th March 2011, 16:42
  2. Replies: 1
    Last Post: 15th December 2010, 13:20
  3. QTableWidgetItem Text
    By pytro in forum Qt Programming
    Replies: 2
    Last Post: 6th August 2007, 21:44
  4. Window OS make distclean && qmake && make one line
    By patrik08 in forum General Programming
    Replies: 4
    Last Post: 22nd March 2007, 10:43
  5. Im became fool with QTableWidgetItem
    By zorro68 in forum Qt Programming
    Replies: 3
    Last Post: 28th February 2007, 12:17

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.