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. Change back to qlabel from setpixmap

Change back to qlabel from setpixmap

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 583 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.
  • S Offline
    S Offline
    sharon_obl82
    wrote on last edited by
    #1

    Hi,

    I have the following code:
    @
    void MainWindow::on_lineEdit_2_textEdited(const QString &arg1)
    {
    QPixmap black (":/new/circle_black.png");
    ui->label_6->setPixmap(black);
    }
    @

    where the pixmap will be shown when user edits the textbox. When Ok is button is clicked, i would like to make the label to go back to the same state as before. I don't want to use the property sethidden(true) or setvisible(false) because it would hide the label and the alignment will run. Is there a way to set the label back? Initially it is just empty label on the form and not visible.

    Appreciate it if someone can help. Thank you!

    1 Reply Last reply
    0

    • Login

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