Does anyone know how I can set the name of column in a QTable ? Right
now they are labeled "1", "2", ...
Thanks in advance,
> Does anyone know how I can set the name of column in a QTable ? Right
> now they are labeled "1", "2", ...
> Thanks in advance,
It's all in the documentation....
- System : RedHat Linux 7.1 /, 6.1
- Compiler : gcc-2.96 / egcs-2.91.66
- QTVersion: Qt 2.3.1 binaries/devel from KDE.2.2 site.(try with others qt
2.3.1 version and also with a version compiled by myself).
- Tested Computers : Intel Pentium II 350, Pentium III 800 & 650, Bi PII 400
- Graphic card tested : Matrox G200/G400 8/16mo with hardware accelration
without, ati rage mobility 8mo.
I think that I have found a bug in QTable or parents classes. The bug is :
When you fix the number of rows of a QTable to a limit, the table still
working well but you cannot see the cells values. What it is strange is that
you can edit it, the value is shown during the operation but after it
I'm using qt since a long time for the Tulip project and this bug seems
be new. In older version before 2.3.0 I haven't got this problem.
If you want to see the bug, try to build a table with 10000 rows with
qtDesigner you will see that the grid is not drawed, You can also try the
following sample. On my computer, with this program I can see cells until
170th(I can only see the half of the last row) rows after there is nothing
but I can edit it.
I searched a lot to correct this bug myself but I didn't find from where
comes. Can you mail me if you already now this bug and/or if it will be
corrected soon ?
Source code :
#define NUM_ROWS 10000
#define NUM_COLS 5
int main(int argc, char **argv)
int r, c;
QApplication app(argc, argv);
QTable table(NUM_ROWS, NUM_COLS);
for (r = 0; r < table.numRows(); r++)
for (c = 0; c < table.numCols(); c++)
str.sprintf("item %ld, %ld", r+1, c+1);
table.setText(r, c, str);