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
QtWS25 Last Chance

Close the widget when push the button

Scheduled Pinned Locked Moved Solved General and Desktop
qt5pushbuttonwidget
3 Posts 2 Posters 1.1k 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 10 Feb 2021, 07:37 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 J 2 Replies Last reply 10 Feb 2021, 07:49
    0
    • D deleted286
      10 Feb 2021, 07:37

      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 10 Feb 2021, 07:49 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
        10 Feb 2021, 07:37

        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();
        }
        }
        
        J Offline
        J Offline
        JonB
        wrote on 10 Feb 2021, 08:09 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

        3/3

        10 Feb 2021, 08:09

        • Login

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