Hi, all.
foi set some widget's padding and margins in a style sheet. and how can i get it in my code? for example, i write:
Qt Code:
  1. QTableView::item{
  2. padding:10px;
  3. margins:10px;
  4. border:1px solid red;
  5. border-radius:5px;
  6. }
To copy to clipboard, switch view to plain text mode 

and i reimplement
Qt Code:
  1. QStyledItemDelegate::(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index)const
To copy to clipboard, switch view to plain text mode 
, i want the padding and margins of this item here, what shall i do?

i wonder item's padding and margins since i want to put html-text in the item, and paint the html-text by self when implementing paint(), however, i have to translate correctly to the rect that text should be displayed, or else, the text might be overlapped with the borders.

Thank you.