Home > Mobile >  QLabel why don't show the pictures????? The couple consult!!!!!
QLabel why don't show the pictures????? The couple consult!!!!!

Time:09-16

inside a constructor can display images, and may not be able to in gameOver function display!!!!!
code where I went wrong, please correct me

CodePudding user response:

QImage image;
Image. The load (" :/failure. The PNG ");

WinLabel - & gt; SetPixmap (QPixmap: : fromImage (image));

CodePudding user response:

Winlabel - & gt; Move to look at the coordinate calculation is correct, images are not loading

CodePudding user response:

Does not show, of course, you haven't call label show, when calling you mean setParent is the parent of the show function, calls a child controls, but when you have shown the parent gameover label is not in its child controls, behind you simply set up a parent, need will only take effect when the next show, or you directly call child controls of the show, or shut down after the setParent parent control, to display it

CodePudding user response:

Oh, I said I didn't even call in the constructor show can also display images is going on? Originally this!
  •  Tags:  
  • Qt
  • Related