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. main window does not update new label name

main window does not update new label name

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 288 Views
  • 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.
  • M Offline
    M Offline
    martinc
    wrote on last edited by
    #1

    Hi,

    I made a very simple tutorial application where a clicked button update a label text.
    However, the text is not updated on button click.
    It updates first after for example resize the window.

    How to make the text update directly on the button click?

    void MainWindow::on_pushButton_2_clicked()
    {
    ui->label->setText("button is clicked");
    }

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      This should work. Can you share complete example or sample code on how u create the object, button etc?.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      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