Re: QTableWidgetItem for a QTableWidget
I'm using Nokia Qt SDK.
I created a QTableWidget that has 2 rows.
On second row I need each item to have a number in the upper left corner, a line from the upper-right to the down-left corner, and a number in the down right corner.
I think, that I have to subclass the QTableWidgetItem, but I don't know what is the best way to achieve my goal, cause, simulating my app on phone, I can turn my phone, so the width of the table elements will change.
My idea right now is to subclass QTableWidgetItem (this action will create a Widget), and apply a layout to this widget. This way I can position the numbers i need. But I don't know how to draw a line across this widget... Any help?
Added after 56 minutes:
Hm... I rethought, and found out that it would be much easier for me to Use QTableWidget function SetCellWidget.
So now I have just need to create a widget with a number in top-left, line from top-right to bottom-left, and number in bottom-right. How can I achieve this?
Re: QTableWidgetItem for a QTableWidget
Quote:
How can I achieve this?
Achieve what?
you mean this?:
Quote:
widget with a number in top-left, line from top-right to bottom-left, and number in bottom-right.
More "low level" than that is only C++ code...
With which part of this do you have a problem?