Home > Mobile >  Qtshow a page shows slowing
Qtshow a page shows slowing

Time:10-11

As shown in figure, A dialog A, B, C,
Problem scenario is like this: from A to B, it simply hide A, showB, nothing to B interface operation returns A interface (hideB, showA) is normal, but B interface has A table, pruning down the form as long as the wait operation to return to the interface of A will interface to brush A half-day (estimated 6-7 seconds, this how can stand), not to collapse, can play A box, but the contents of the box is grey, what all don't show, but to return to the interface of A, B all operations of the interface or other action is done (table and so on all have normal shows), no open threads, etc.,
And I found that the show is too slow, first showMinized, showNormal results and normal again, everyone glad,, what reason is this? Two pages of specific code too much, I won't post, just put one B to return to the interface of A code,
 void cGuideAlterNeedleUi: : on_pushButtonBack_clicked () 
{
//mPtrGuideInputUi - & gt; Show ();
MPtrGuideInputUi - & gt; ShowMinimized ();
MPtrGuideInputUi - & gt; ShowNormal ();
This - & gt; Hide ();

}

Is the groove of a button,

CodePudding user response:

Playing time log, in the show and see which slow to function, and then a concrete analysis

CodePudding user response:

reference 1st floor u010370871 response:
time log, in the show and see which slow to function, and then concrete analysis

Can be more specific? Can you give a sample code? A little don't understand,

CodePudding user response:

refer to the second floor daizhiyan1 response:
Quote: refer to 1st floor u010370871 response:

Playing time log, in the show and see which slow to function, and then concrete analysis

Can be more specific? Can you give a sample code? A little don't understand,


The time between two lines of code written to a file, and then compare the time is not ok

CodePudding user response:

reference u010370871 reply: 3/f
Quote: refer to the second floor daizhiyan1 response:

Quote: refer to 1st floor u010370871 response:

Playing time log, in the show and see which slow to function, and then concrete analysis

Can be more specific? Can you give a sample code? A little don't understand,


The time between two lines of code written to a file, and then compare the time no yao

Know what you mean, recorded in the log file between the two lines run code to add time, more time, I try ha,

CodePudding user response:

reference 4 floor daizhiyan1 response:
Quote: reference u010370871 reply: 3/f

Quote: refer to the second floor daizhiyan1 response:

Quote: refer to 1st floor u010370871 response:

Playing time log, in the show and see which slow to function, and then concrete analysis

Can be more specific? Can you give a sample code? A little don't understand,


The time between two lines of code written to a file, and then compare the time no yao

Know what you mean, recorded in the log file between the two lines run code to add time, more time, I try ha,


Right, so positioning to show where function is slow, slow if not show is that the original processing logic you slow

CodePudding user response:

Not recommended two interface show hide you can use a stacked widget put two Windows, setCurrentWidget switch () two Windows

CodePudding user response:

refer to 6th floor u013917429 response:
not recommended two interface show hide you can use a stacked widget put two Windows, setCurrentWidget () it is good to switch two window

Appreciate, don't know how stacled widget this stuff, excuse me multiple interface show or hide, especially the interface more cases there may be something? What are the reasons?

CodePudding user response:

Recently, I also met show not to come out, you can try the call after the show this time QAppliaction: : processEvents ()
Because the show is an event, and threads in other time-consuming operation (large file to read and write, copy, etc.) will not immediately call the show events,

CodePudding user response:

Put this - & gt; Hide (); Commented out,
How long does it take to see mPtrGuideInputUi window display

CodePudding user response:

Studied the
  •  Tags:  
  • Qt
  • Related