[Qt-interest] Text alignment
Phil
phillor at telstra.com
Wed Nov 4 07:03:27 CET 2009
On Tue, 3 Nov 2009 07:47:44 pm Paul Colby wrote:
> The problem, essentially, is that the way you are adding new items
> from the list *replaces* the original items, but you are only setting
Thanks Paul. I tried both of your suggestions but, unfortunately, the
alignment is still left justified. Take the following code for example:
for(int column = 0; column < 4; column++)
{
tableItem[row][column] = new QTableWidgetItem("x");
tableItem[row][column]->setTextAlignment(Qt::AlignHCenter);
}
Shouldn't the x be aligned in the centre of each cell rather on the left side?
It's not unlikely that this problem relates to a dialog problem that I will
post as a separate question.
--
Regards,
Phil
More information about the Qt-interest-old
mailing list