Hi,
I'm trying to create a custom calendar based on a QTableWidget.
My Problem is, that I need to display text within the cells in different corners. The day number (1 - 31) should be displayed in the top left corner of the cell. That works fine using Qt Alignment to the QTableWidgetItems.
But now I'd also like to add some text in the center of the cells and two or three icons in the top right corner, vertically orientated.
I know, that I can't do this with pure QTableWidgetItems, so I thought of a custom QWidget that holds a separate QTableWidget, so I have maximum options to position my stuff into the cell.
Question 1:
Is that the right way to solve my problem? Maybe using many QWidgets/QTableWidgets inside a QTablewidget needs too much memory and results in bad performance?
Question 2:
Qt documentation says, QItemDelegate is a better way for displaying custom text/edit data inside cells. Can I use QItemDelegate for my purposes and if yes, should I prefer it?
Thank you in anticipation!
Binary
Bookmarks