开发者

QGraphics paints custom widget differently in paintEvent than resizeEvent and vice-versa

开发者 https://www.devze.com 2023-03-19 04:48 出处:网络
I have written code for my graph and it works fine, but when I need to resize it, problems start. Resize event doesn\'t fit my QGraphicScene to QGraphic开发者_运维技巧sView, but same code in paint ev

I have written code for my graph and it works fine, but when I need to resize it, problems start.

Resize event doesn't fit my QGraphicScene to QGraphic开发者_运维技巧sView, but same code in paint event works fine.

I can't use paint event, 'cause it makes recursive painting in symbian(It works fine in desktop).

Resize event works fine if I resize window after first run, but I wan't to fit scene in my view from first run to end of program.

Here is pics of resizeEvent:

QGraphics paints custom widget differently in paintEvent than resizeEvent and vice-versa

and paintEvent:

QGraphics paints custom widget differently in paintEvent than resizeEvent and vice-versa

Both event's have same code inside.

Thanks in advance.

0

精彩评论

暂无评论...
验证码 换一张
取 消