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:
padding:10px;
margins:10px;
border:1px solid red;
border-radius:5px;
}
QTableView::item{
padding:10px;
margins:10px;
border:1px solid red;
border-radius:5px;
}
To copy to clipboard, switch view to plain text mode
and i reimplement
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.
Bookmarks