Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to add a functional "upload picture" button?
Forum Updated to NodeBB v4.3 + New Features

How to add a functional "upload picture" button?

Scheduled Pinned Locked Moved Unsolved General and Desktop
21 Posts 6 Posters 2.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Rangerguy128

    @Pl45m4 Like this? 5796f4ff-967d-4e96-81b7-1973ef45cf48-image.png

    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.

    Pl45m4P Offline
    Pl45m4P Offline
    Pl45m4
    wrote on last edited by
    #21

    @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.


    If debugging is the process of removing software bugs, then programming must be the process of putting them in.

    ~E. W. Dijkstra

    1 Reply Last reply
    1

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved