Do you think that I have something wrong with my flags.. ?
Qt
::ItemFlags MyClass
::flags(const QModelIndex &index
) const{
if (index.isValid())
return Qt::ItemIsEnabled | Qt::ItemIsSelectable
| Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled;
return Qt::ItemIsEnabled | Qt::ItemIsDropEnabled;/*| Qt::ItemIsSelectable;*/
}
Qt::ItemFlags MyClass::flags(const QModelIndex &index) const
{
if (index.isValid())
return Qt::ItemIsEnabled | Qt::ItemIsSelectable
| Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled;
return Qt::ItemIsEnabled | Qt::ItemIsDropEnabled;/*| Qt::ItemIsSelectable;*/
}
To copy to clipboard, switch view to plain text mode
or with the way I initialize qlistviews gridsize:
QSize siz
= whiteboard
->size;
iconList->setIconSize(siz);
iconList->setGridSize(isiz);
iconList->setSpacing(inc_size);
iconList->setUniformItemSizes(true);
QSize siz = whiteboard->size;
QSize isiz = siz + QSize(3*inc_size, 3*inc_size);
iconList->setIconSize(siz);
iconList->setGridSize(isiz);
iconList->setSpacing(inc_size);
iconList->setUniformItemSizes(true);
iconList->setMovement(QListView::Snap);
To copy to clipboard, switch view to plain text mode
Bookmarks