From bfe87ae31af8398d3bc0bf26a7dac3dbdecec569 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 6 Jun 2015 07:36:39 +0200 Subject: Resize PictureViewer2 Make it possible to resize the PictureViewer2 and get rid of fixed size. Also, make sure that the current picture is redrawn when we get a resize event. --- pictureviewer2.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'pictureviewer2.h') diff --git a/pictureviewer2.h b/pictureviewer2.h index c9c7688..bfc1977 100644 --- a/pictureviewer2.h +++ b/pictureviewer2.h @@ -48,7 +48,6 @@ class PictureViewer2 : public QGraphicsView { void setCurrentDir(const QString &curDir) { mCurrentDir = curDir; } const PicDataList marked() { return mMarkedFiles; } PicData picData(const QString &fullPath); - virtual QSize sizeHint() const; public slots: void next(); @@ -73,6 +72,7 @@ class PictureViewer2 : public QGraphicsView { virtual void keyPressEvent(QKeyEvent *e); virtual void showEvent(QShowEvent *e); virtual void hideEvent(QHideEvent *e); + virtual void resizeEvent(QResizeEvent *event); private slots: void showFile(const PicData &data); @@ -90,7 +90,6 @@ class PictureViewer2 : public QGraphicsView { PicDataList mFiles; PicDataList mMarkedFiles; QGraphicsScene *mScene; - QSize mSize; QGraphicsPixmapItem *mCur; int mCurPos; int mConfigInfoPos; -- cgit v1.2.3-70-g09d2