How to add a functional "upload picture" button?
-
@Pl45m4 Like this?
Is the image positioned well enough? Should the text be centered or is it not necessary? The uploaded image should be the only thing to be shown in the label.
@Rangerguy128 said in How to add a functional "upload picture" button?:
Should the text be centered or is it not necessary? The uploaded image should be the only thing to be shown in the label.
Just try it. You will see that you don't need the text anyway. As soon as you set the image with something like
ui->label->setPixmap(....);
the text will be replaced with the image.
If you make sure that the page with the label is never shown when there is no image, then you don't need any text.
In this case the text is just for you to see where the label actually is. Because when you remove the text, the label is very hard to track in QtDesigner since it's almost invisible. You can only see its border/frame.