I have created one table by using QTableview
and QAbstractTableModel
. In the last column, I am also able to add a button for every row (right corner of that cell). Now I want to customize its style, like change the background color to black, border, etc.
Is there any way to achieve this?
IMO the best approach is to use a style sheet. http://doc.qt.io/qt-5/stylesheet-syntax.html http://doc.qt.io/qt-5/stylesheet-reference.html
delegate.h:
delegate.cpp:
main.cpp