I meant this:
Code:
G2_ThumbsList
::G2_ThumbsList(QWidget *parent,
unsigned int iconWidth,
unsigned int iconHeight
) : QListWidget(parent
){
this->setFixedHeight(116);
this
->setGridSize
(QSize(126,
116));
this->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
this->setThumbsSize(iconWidth, iconHeight);
this->setWrapping(false);
}
void G2_ThumbsList::addThumb(G2_Thumb *thumb)
{
this->addItem(thumb);
}
void G2_ThumbsList::insertThumb(G2_Thumb *thumb, unsigned int position)
{
if(position < this->count())
{
// HERE...?
}
else
{
this->addItem(thumb);
}
}
G2_ThumbsList::G2_ThumbsList(QWidget *parent, unsigned int iconWidth, unsigned int iconHeight) : QListWidget(parent)
{
this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Ignored);
this->setFixedHeight(116);
this->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
this->setMovement(QListView::Static);
this->setGridSize(QSize(126, 116));
this->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
this->setThumbsSize(iconWidth, iconHeight);
this->setViewMode(QListView::IconMode);
this->setWrapping(false);
}
void G2_ThumbsList::addThumb(G2_Thumb *thumb)
{
this->addItem(thumb);
}
void G2_ThumbsList::insertThumb(G2_Thumb *thumb, unsigned int position)
{
if(position < this->count())
{
// HERE...?
}
else
{
this->addItem(thumb);
}
}
To copy to clipboard, switch view to plain text mode
(Note: G2_Thumb inherits QListWidgetItem)
I think that QTableWidget and QTreeWidget don't suite my situation..
Thank you! Dario
Bookmarks