Change back to qlabel from setpixmap



  • 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!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.