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()); } }
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()); } }