Home > Back-end >  QT4 procedures turn after QT5 UI interface does not automatically refresh
QT4 procedures turn after QT5 UI interface does not automatically refresh

Time:10-20

Originally I QT4 program is running, on the interface has a label and a few button, label
Is used to refresh the current duration, button, according to hide or click on one of the other program is now fully into QT5,
These two functions can be normal use, but the screen doesn't refresh, if I again after by minimizing the maximization, this interface
Controls set by the appearance of a (normal label should refresh the duration, but now only display a fixed time), I don't know
Master ever met or know to solve such problems

CodePudding user response:

The program code is in a long cycle of change interface display?

CodePudding user response:

The other functions temporarily closed, only keep the Timer to display the time, see if there is something wrong

CodePudding user response:

In the program I am not on the UI thread to do the operation, if you need recycled are threads (also allocate kernel USES?) to get it under control,

CodePudding user response:

refer to the second floor @ the wind light cloud light _ reply:
other functions temporarily closed, only keep the Timer to display the time, to see whether the normal

I do as you said the corresponding operation, found a problem;
I said about my first part of the whole system includes, the whole system includes four interface, which is the second interface to add a QtabWidget controls, this control is for the purpose of his I add other interface used, the question now is if I'm not in the inside of the second interface QtabWidge add the original QWidget, but add an empty Qwdiget, so there is no problem, if I add or original QWidget 'words will appear this phenomenon, I ask don't know what's wrong, the original QWidget interface contains only inside thread triggers a slot function in the continuous operation of the outside (only when I enter the interface will refresh interface), I would like to ask about what is this is because the great god causes, if can I give you a look at the code, why can QT4, whereas QT5 can not run normally,

CodePudding user response:

So a word is added in the main window class can solve!
Protected:
//solve the BUG of QT5 interface not refresh,
Virtual void showEvent (QShowEvent * event)
{
This - & gt; The setAttribute (Qt: : WA_Mapped);
QWidget: : showEvent (event);
}
I wonder why, this should be a lot of problems when they turn QT4 QT5, how there is no one will be?
But I find out why naturally want to share, as for those who want to learn again, there are people who do not willing to share, I
Can only say that you will not,

CodePudding user response:

Qt 5 bugs
Add in the showevent
This - & gt; The setAttribute (Qt: : WA_Mapped);
Can solve

CodePudding user response:

refer to 6th floor justformemory response:
Qt 5 bugs
Add in the showevent
This - & gt; The setAttribute (Qt: : WA_Mapped);
Can solve
could you tell me how to lead to the occurrence of this problem? Is
  • Related