Qt frames disappear after a while

I made a windows form application in Qt, and I have QPushButton, QGroupBox, etc., and the application works fine.

But when I leave the application the next day, I see that all the frames around the buttons, group boxes and all widgets that have frames disappear. But the application still works as it should.

How it looks Here I edited the image as it looks.

The application installs some style sheets in some widgets in other dialog boxes and enables and disables one widget.

But does anyone have the same problems? And maybe explain why this is happening?

+6
source share
1 answer

Your program might leak GDI objects.

A Windows application can only use 9999 GDI objects. when your application flows too many GDI objects, your application will look like your image.

You can press Ctrl + Shift + Esc to find out how many GDI objects your application is using.

0
source

All Articles