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. How to close SecondaryWindow from non-caller function
QtWS25 Last Chance

How to close SecondaryWindow from non-caller function

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 240 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.
  • J Offline
    J Offline
    JacobNovitsky
    wrote on last edited by
    #1

    having SecondaryWindow called from main
    need to close it from SecondaryWindow's cpp function which called from SecondaryWindow menu
    tried to delete ui, throws an error

    JonBJ 1 Reply Last reply
    0
    • J JacobNovitsky

      having SecondaryWindow called from main
      need to close it from SecondaryWindow's cpp function which called from SecondaryWindow menu
      tried to delete ui, throws an error

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @JacobNovitsky Just call close() or hide(), depending which one you want?

      J 1 Reply Last reply
      0
      • JonBJ JonB

        @JacobNovitsky Just call close() or hide(), depending which one you want?

        J Offline
        J Offline
        JacobNovitsky
        wrote on last edited by JacobNovitsky
        #3

        this->close worked for me

        Pl45m4P 1 Reply Last reply
        0
        • J JacobNovitsky

          this->close worked for me

          Pl45m4P Offline
          Pl45m4P Offline
          Pl45m4
          wrote on last edited by
          #4

          @JacobNovitsky said in How to close SecondaryWindow from non-caller function:

          this->close worked for me

          this?! You said you want to close the window from the calling widget where the windows is shown?! If you call this->close() you would close your current window and not SecondaryWindow, no?!


          If debugging is the process of removing software bugs, then programming must be the process of putting them in.

          ~E. W. Dijkstra

          JonBJ 1 Reply Last reply
          0
          • Pl45m4P Pl45m4

            @JacobNovitsky said in How to close SecondaryWindow from non-caller function:

            this->close worked for me

            this?! You said you want to close the window from the calling widget where the windows is shown?! If you call this->close() you would close your current window and not SecondaryWindow, no?!

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by
            #5

            @Pl45m4

            @JacobNovitsky said in How to close SecondaryWindow from non-caller function:

            having SecondaryWindow called from main
            need to close it from SecondaryWindow's cpp function which called from SecondaryWindow menu

            I took this to mean that SecondaryWindow is created from main but then it wants to close itself from a menu all inside SecondaryWindow, hence this.

            Pl45m4P 1 Reply Last reply
            0
            • JonBJ JonB

              @Pl45m4

              @JacobNovitsky said in How to close SecondaryWindow from non-caller function:

              having SecondaryWindow called from main
              need to close it from SecondaryWindow's cpp function which called from SecondaryWindow menu

              I took this to mean that SecondaryWindow is created from main but then it wants to close itself from a menu all inside SecondaryWindow, hence this.

              Pl45m4P Offline
              Pl45m4P Offline
              Pl45m4
              wrote on last edited by
              #6

              @JonB

              Then the title of this is weird...


              If debugging is the process of removing software bugs, then programming must be the process of putting them in.

              ~E. W. Dijkstra

              1 Reply Last reply
              1

              • Login

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