Hello all.
Seems like a bug...
in constructor:
ui
->tableView
->horizontalHeader
()->setResizeMode
(QHeaderView::ResizeToContents);
ui
->tableView
->verticalHeader
()->setResizeMode
(QHeaderView::ResizeToContents);
ui->tableView->resizeColumnsToContents();
ui->tableView->resizeRowsToContents();
connect(ui->tableView->horizontalHeader(), SIGNAL(sectionResized(int,int,int)),
ui->tableView, SLOT(resizeRowsToContents()));
ui->tableView->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents);
ui->tableView->verticalHeader()->setResizeMode(QHeaderView::ResizeToContents);
ui->tableView->resizeColumnsToContents();
ui->tableView->resizeRowsToContents();
connect(ui->tableView->horizontalHeader(), SIGNAL(sectionResized(int,int,int)),
ui->tableView, SLOT(resizeRowsToContents()));
To copy to clipboard, switch view to plain text mode
It's ok with that if you minimize the window/restore the state of the window.
But when window is maximizing QTableView's row heights stay unaffected by event. Just ignore maximization...
One strange thing: after maximization, row heights seem like resized for a normal window state. After returning from maximized state to normal, row heights seem like resized for a maximized window state, i.e. in other words resizing is looks like working with a latency equally to the previous window state. Seems like row height's resizing happens for the old WindowState, just before window became into the new state.
Just one window's minimization repairs the situation but, till another maximization...
Any workaround?
Thanks.
---
Qt 4.6.2
WinXP SP2 Rus
Qt SDK 2010.01
Bookmarks