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. Close the widget when push the button

Close the widget when push the button

Scheduled Pinned Locked Moved Solved General and Desktop
qt5pushbuttonwidget
3 Posts 2 Posters 1.5k 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.
  • D Offline
    D Offline
    deleted286
    wrote on last edited by
    #1

    I have a push button which name is Ok. I want to close the widget when i clicked on Ok button. I've written the code below but it doesnt work. How can i do it?

    void uk_yapilandirma::on_Ok_toggled(bool checked)
    {
    if(checked == true) {
        ui->Ok->close();
    }
    }
    
    D JonBJ 2 Replies Last reply
    0
    • D deleted286

      I have a push button which name is Ok. I want to close the widget when i clicked on Ok button. I've written the code below but it doesnt work. How can i do it?

      void uk_yapilandirma::on_Ok_toggled(bool checked)
      {
      if(checked == true) {
          ui->Ok->close();
      }
      }
      
      D Offline
      D Offline
      deleted286
      wrote on last edited by
      #2

      @suslucoder
      I did it like this way, it works

      void uk_yapilandirma::on_Ok_clicked()
      {
          this->close();
      }
      
      1 Reply Last reply
      0
      • D deleted286

        I have a push button which name is Ok. I want to close the widget when i clicked on Ok button. I've written the code below but it doesnt work. How can i do it?

        void uk_yapilandirma::on_Ok_toggled(bool checked)
        {
        if(checked == true) {
            ui->Ok->close();
        }
        }
        
        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #3

        @suslucoder said in Close the widget when push the button:

        want to close the widget when i clicked on Ok button.

        What widget (do you want to close)?

        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