Solved widget with Qt::WA_NoSystemBackground attribute make text coincides with previous text
-
Hi,
What is your question ?
-
in this programm,when i change the label's text,the previous text does't disappear,old and new text show together
and i must have the code(widget.setAttribute(Qt::WA_NoSystemBackground);) to solve some issue -
What issues do you have that requires that attribute set ?
-
@SGaist sorry for reply later and my unskilled english
Because flicker appears When i run my application in embedeed system,then i found that set that attribute will solve the issue,But another issue comes,as you see in that picture,the previouse text and the new text show together.Yestoday i found that setAttribute(Qt::WA_TranslucentBackground) worked,But it makes the widget's background transparent -
Did you try to track the reason of the flickering ?
What else are you doing that could trigger that ?
-
@SGaist The reason of the flickering i have asked in another topic,the main code bring the issue is
QGraphicsView view;
view.setViewport(new QGLWidget)
i don't know how it happenthank you very much
-
Ok, then can you explain exactly what is the original problem you have since everything seems related to that flickering issue ? Are you trying to put a label over a QGraphicsScene ? Are you trying to have text on that scene ?
-
@SGaist neither,the original problem is my application flicker in embedded system, i tracked that
QGraphicsView view;
view.setViewport(new QGLWidget)
this code case the problem,But i have no any idea why,I have tryed to track the Qt open-source but failed,then i found that
this->setAttribute(Qt::WA_NoSystemBackground)
this code is effective,But it bring a new problem that the text overlapping,Then i found that set the transparent attribute will solve the overlapping problem,
so this problem seems has solved -
Did you check that your embedded system has proper OpenGL support ?
-
@SGaist Yes,it support OpenGL