Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Brainstorm
  4. 2 Widgets, when focus lost hide other
Forum Updated to NodeBB v4.3 + New Features

2 Widgets, when focus lost hide other

Scheduled Pinned Locked Moved Unsolved Brainstorm
10 Posts 4 Posters 1.7k Views 1 Watching
  • 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.
  • EmrecpE Offline
    EmrecpE Offline
    Emrecp
    wrote on last edited by Emrecp
    #1

    Hi,
    Video
    I Have 2 widgets. When I Hover Mouse to Widget1, widget2 showing when leaveEvent on Widget1, Widget2 hiding. That's works fine.

    But in picture as you see there is 10px space between widget1 and widget2. So while moving mouse from widget1 to widget2, shouldn't hide widget2. I need only hide widget2 when mouse not in WIDGET1 and WIDGET2. So I need to implement this 10px as in widget.

    Thanks!
    widgetspace.png

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      How are you positioning the widgets ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      EmrecpE 1 Reply Last reply
      0
      • fcarneyF Offline
        fcarneyF Offline
        fcarney
        wrote on last edited by
        #3

        Can you get rid of the spacing make each widget have a border region? So technically the widgets are occupying the space in between? Or use a region surrounding both widgets to control visibility.

        C++ is a perfectly valid school of magic.

        1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          How are you positioning the widgets ?

          EmrecpE Offline
          EmrecpE Offline
          Emrecp
          wrote on last edited by
          #4

          @SGaist Video

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Are you implementing a sys tray icon ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            EmrecpE 1 Reply Last reply
            0
            • SGaistS SGaist

              Are you implementing a sys tray icon ?

              EmrecpE Offline
              EmrecpE Offline
              Emrecp
              wrote on last edited by
              #6

              @SGaist No. As you see in video, I want to scroll down list but when i move to list, list hiding because widget1 leaveEvent.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                So it's in fact some sort of popup that you want to implement ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                EmrecpE 1 Reply Last reply
                0
                • SGaistS SGaist

                  So it's in fact some sort of popup that you want to implement ?

                  EmrecpE Offline
                  EmrecpE Offline
                  Emrecp
                  wrote on last edited by
                  #8

                  @SGaist Yes, if you watch video you will see. I want to popup widget.

                  A 1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    Then you should position the pop manually liked you would with a contextual menu.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • EmrecpE Emrecp

                      @SGaist Yes, if you watch video you will see. I want to popup widget.

                      A Offline
                      A Offline
                      abmyii
                      wrote on last edited by
                      #10

                      @Emrecp How about a variable or if statement in either mouse over/leave event that checks if the mouse is in the second widget?

                      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