示例#1
0
void KNMusicAlbumView::resizeEvent(QResizeEvent *event)
{
    //Do resize.
    QAbstractItemView::resizeEvent(event);
    //Resize the album detail.
    m_albumDetail->resize(size());
    m_albumDetail->setSizeParameter(qMin(width(), height()));
    //If the current index is not null, must ensure that we can display the
    //selected album.
    if(currentIndex().isValid())
    {
        locateTo(currentIndex());
    }
}
示例#2
0
void KNMusicAlbumView::resizeEvent(QResizeEvent *event)
{
    //Do resize.
    QAbstractItemView::resizeEvent(event);
    //Update the parameters of the view first.
    updateUIElements();
    //Resize the album detail.
    m_albumDetail->resize(size());
    //If the current index is not null, must ensure that we can display the
    //selected album.
    if(currentIndex().isValid())
    {
        locateTo(currentIndex());
    }
}