Hi all!

I've a QTableWidget in a Window. When the window is resized by the user, the size of QTableWidget is adapted automatically. As all my QTableWidgetItem have a fixed size, i'd like to change the number of rows and columns of my QTableWidget to display as many elements as possible. Unfortunately i encounter several problems:

1) If i want to populate my QTableWidget in the QMainWindow constructor, tableWidget->width() and tableWidget->height() keep sending me the wrong size. I guess it is because the real size is calculated *after* the constructor. Alas i need to know the actual size from the constructor if i want to set the right number of rows and columns. Any idea?

2) I can't seem to find a kind of "resized" signal which i would send to a function that would change the number of rows/columns of my QTableWidget before repainting it. Without it i can't know when the widget is resized and when i've to change the geometry of my table.

3) Displaying and resizing (changing the number of rows and columns) is very slow as i have to 65536 (and probably more later) items to move.

If you want to get the idea of what i want to do, check gucharmap (the gnome character selector). When you change the size of the window, the grid is automatically adapted. I need exactly this.

Thank you very much for any tips,

Med