if(loadstate != 1) { if(loadstate == 0) { QLabel::paintEvent(event); } else { loadstate = 0; showPage(currentPage); } } else loadstate = 2;