If I want to switch the QT3 Q3Table code to QT4 QTableWidget, what changes should I make to the following methods?

Qt Code:
  1. setResizePolicy( Q3Table::Default );
  2. setReadOnly( TRUE );
  3. setTopMargin(31);
  4. setLeftMargin(-1);
  5. setFocusStyle( Q3Table::FollowStyle );
  6. updateCell( 1, 0 );
To copy to clipboard, switch view to plain text mode 

And in the past, I can override the virtual paint method:
Qt Code:
  1. void QTableItem::paint ( QPainter * p, const QColorGroup & cg, const QRect & cr, bool selected ) [virtual]
To copy to clipboard, switch view to plain text mode 

What should I do in order to change that to QTableWidgetItem?

Thanks a lot!!!