Skip to content

Commit 86217a2

Browse files
committed
Add white background to image viewer
Signed-off-by: xiaoming <2014500726@smail.xtu.edu.cn>
1 parent fcf5ccb commit 86217a2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/ImgViewer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ void ImgViewer::paintEvent(QPaintEvent *event) {
196196
if (!this->img_list.empty()) {
197197
QPainter painter;
198198
painter.begin(this);
199+
painter.fillRect(event->rect(), Qt::white);
199200
draw_img(&painter);
200201
painter.end();
201202
}

0 commit comments

Comments
 (0)