Cremers
30th September 2013, 14:47
Hello,
I'm stuck.
I have a set of pixmaps in 3 sizes 16x16, 24x24 and 32x32.
I want to display them in a tableview:
switch (size)
{
case 16: model->setItem(a, b, new QStandardItem(symbol16[c], "")); break;
case 24: model->setItem(a, b, new QStandardItem(symbol24[c], "")); break;
case 32: model->setItem(a, b, new QStandardItem(symbol32[c], "")); break;
}
But the table always displays the small size, it's like it resizes the big ones.
When I paint them on a qimage or something, all is fine.
I tried QStandardItem::sizeHint but no go.
Thanks for your help.
I'm stuck.
I have a set of pixmaps in 3 sizes 16x16, 24x24 and 32x32.
I want to display them in a tableview:
switch (size)
{
case 16: model->setItem(a, b, new QStandardItem(symbol16[c], "")); break;
case 24: model->setItem(a, b, new QStandardItem(symbol24[c], "")); break;
case 32: model->setItem(a, b, new QStandardItem(symbol32[c], "")); break;
}
But the table always displays the small size, it's like it resizes the big ones.
When I paint them on a qimage or something, all is fine.
I tried QStandardItem::sizeHint but no go.
Thanks for your help.