I now believe this is a Qt 4.4.2 issue. A mouse press on the corner widget selects all items in both versions but Ctrl mouse press unselects all only in 4.3.4. The following code displays this problem:
#include <QApplication>
#include <QTableView>
#include <QStandardItemModel>
int main( int argc, char **argv )
{
for( int r=0; r<5; r++ )
{
for( int c=0; c<2; c++)
{
model.setItem(r, c, item);
}
}
table->setModel( &model );
table->show();
return app.exec();
}
#include <QApplication>
#include <QTableView>
#include <QStandardItemModel>
int main( int argc, char **argv )
{
QApplication app( argc, argv );
QTableView *table = new QTableView();
QStandardItemModel model( 5, 2 );
for( int r=0; r<5; r++ )
{
for( int c=0; c<2; c++)
{
QStandardItem *item =
new QStandardItem( QString("Row:%0, Column:%1").arg(r).arg(c) );
model.setItem(r, c, item);
}
}
table->setModel( &model );
table->show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
Bookmarks