macosx lobby redraw bugfix (first try)

This commit is contained in:
doitux
2007-11-29 11:58:23 +00:00
parent e0b6e16994
commit 173df346e3
3 changed files with 46 additions and 10 deletions
@@ -33,17 +33,29 @@ void MyGameListTreeWidget::setGameListBackgroundImage(QString pmString) {
gameListBGPixmap.load(pmString);
}
void MyGameListTreeWidget::paintEvent(QPaintEvent *event) {
QPainter painter(viewport());
painter.drawPixmap(50, 5, gameListBGPixmap);
QTreeWidget::paintEvent(event);
}
// void MyGameListTreeWidget::paintEvent(QPaintEvent *event) {
//
// /* QPainter painter(viewport());
// QVector<QRect> rects = event->region().rects();
// for (int i = 0; i < rects.count(); i++) {
// if (rects[i].width() > gameListBGPixmap.width())
// rects[i].setWidth(gameListBGPixmap.width());
// if (rects[i].height() > gameListBGPixmap.height())
// rects[i].setHeight(gameListBGPixmap.height());
// painter.drawPixmap(rects[i].translated(50,5), gameListBGPixmap, rects[i]);
// }
// painter.end();
// QTreeWidget::paintEvent(event);*/
//
// QPainter painter(viewport());
// painter.drawPixmap(50, 5, gameListBGPixmap);
//
// QTreeWidget::paintEvent(event);
// }
void MyGameListTreeWidget::scrollContentsBy ( int dx, int dy ) {
viewport()->update();
QTreeWidget::scrollContentsBy ( dx,dy );
}
}