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. Widget MouseHoverEvent Disable

Widget MouseHoverEvent Disable

Scheduled Pinned Locked Moved Unsolved General and Desktop
29 Posts 3 Posters 3.9k 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.
  • A Offline
    A Offline
    alonewolfsemmmy
    wrote on last edited by
    #1

    Hello I want to disable widget on mousehover How Can I Can you help me
    Thank you

    JonBJ 1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      What do you mean?
      So when the user hover mouse over a Widget, then its disabled ?
      You could use an event filter to catch the hover event
      https://doc.qt.io/qt-5/eventsandfilters.html

      1 Reply Last reply
      0
      • A alonewolfsemmmy

        Hello I want to disable widget on mousehover How Can I Can you help me
        Thank you

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

        @alonewolfsemmmy
        Since Qt's CSS does not support any enabled/disabled attribute to use for the :hover pseudo-state you will have to do it in code by subclassing QWidget and using the enterEvent/leaveEvent methods.

        1 Reply Last reply
        1
        • A Offline
          A Offline
          alonewolfsemmmy
          wrote on last edited by
          #4

          @JonB @mrjj
          Hello EveryBody have a good day I have a problem.
          I want to read SerialPort 5 Megabit BaudRate and QCustomPlot with graphic plot
          I have a problem When SerialPort read 5 megabit widget form on mouse hover crcCalculate error
          I want to disable Widget on mousehover disable
          How Can I and why get I crc calculate widget form on mousehover

          JonBJ 1 Reply Last reply
          0
          • A alonewolfsemmmy

            @JonB @mrjj
            Hello EveryBody have a good day I have a problem.
            I want to read SerialPort 5 Megabit BaudRate and QCustomPlot with graphic plot
            I have a problem When SerialPort read 5 megabit widget form on mouse hover crcCalculate error
            I want to disable Widget on mousehover disable
            How Can I and why get I crc calculate widget form on mousehover

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

            @alonewolfsemmmy
            No idea what your latest question means.... Nor why serial port/custom plot widgets have the faintest connection to mouse hover, other than you needing to write whatever code you need to write....

            1 Reply Last reply
            0
            • A Offline
              A Offline
              alonewolfsemmmy
              wrote on last edited by
              #6

              I have a problem Serial port 5 megabit baudrate read data And QcustomPlot graph plot but widget mousehover when crccalculate error How Can I fixed

              mrjjM 1 Reply Last reply
              0
              • A alonewolfsemmmy

                I have a problem Serial port 5 megabit baudrate read data And QcustomPlot graph plot but widget mousehover when crccalculate error How Can I fixed

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by mrjj
                #7

                @alonewolfsemmmy said in
                Hi

                but widget mousehover when crccalculate error How Can I fixed

                This sentence dont really tell what is wrong.

                Also what is crccalculate ?

                Maybe a picture will help us understand what you need to fix or do ?

                1 Reply Last reply
                1
                • A Offline
                  A Offline
                  alonewolfsemmmy
                  wrote on last edited by
                  #8

                  @mrjj
                  When I hover over the widget with the mouse while reading the serial port data, I get an error in the Crc32 calculation. That is, when the mouse moves, while reading the serial port at a speed of 5 megabits

                  mrjjM 1 Reply Last reply
                  0
                  • A alonewolfsemmmy

                    @mrjj
                    When I hover over the widget with the mouse while reading the serial port data, I get an error in the Crc32 calculation. That is, when the mouse moves, while reading the serial port at a speed of 5 megabits

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    @alonewolfsemmmy

                    Ok, that way. well you could set the button to disabled so remove the hovering effect but
                    it sounds very odd that such a small effect would give you CRC errors.

                    1 Reply Last reply
                    1
                    • A Offline
                      A Offline
                      alonewolfsemmmy
                      wrote on last edited by
                      #10

                      Okay How Can I you said please help me for example code:
                      ui->pusbutton ? thenk you

                      JonBJ 1 Reply Last reply
                      0
                      • A alonewolfsemmmy

                        Okay How Can I you said please help me for example code:
                        ui->pusbutton ? thenk you

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

                        @alonewolfsemmmy
                        Example code for what? And we expect you to write the code and ask questions, not just ask others to write it for you.

                        1 Reply Last reply
                        0
                        • A Offline
                          A Offline
                          alonewolfsemmmy
                          wrote on last edited by
                          #12

                          No button to disabled so remove the hovering effect How Can I
                          I don't know how to turn off the button hovering effect
                          Please help me My friend I need your help

                          JonBJ 1 Reply Last reply
                          0
                          • A alonewolfsemmmy

                            No button to disabled so remove the hovering effect How Can I
                            I don't know how to turn off the button hovering effect
                            Please help me My friend I need your help

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

                            @alonewolfsemmmy
                            No, you need to do some reading of the documentation, try some things, and write questions which people can understand, even if English is not your native language.

                            1 Reply Last reply
                            2
                            • mrjjM Offline
                              mrjjM Offline
                              mrjj
                              Lifetime Qt Champion
                              wrote on last edited by
                              #14

                              Hi
                              This function
                              https://doc.qt.io/qt-5/qwidget.html#enabled-prop

                              1 Reply Last reply
                              1
                              • A Offline
                                A Offline
                                alonewolfsemmmy
                                wrote on last edited by
                                #15

                                @mrjj please I didn't you said Please tell me example thank you my friend

                                mrjjM 1 Reply Last reply
                                0
                                • A alonewolfsemmmy

                                  @mrjj please I didn't you said Please tell me example thank you my friend

                                  mrjjM Offline
                                  mrjjM Offline
                                  mrjj
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #16

                                  hi
                                  Its very helpful to be able to use the docs.
                                  anyway, try
                                  ui->buttoname->setEnabled(false);

                                  the button should show a bit grey and no hover effect.

                                  1 Reply Last reply
                                  1
                                  • A Offline
                                    A Offline
                                    alonewolfsemmmy
                                    wrote on last edited by
                                    #17

                                    @mrjj
                                    You said didn't work I want to widget on mousehover disable effect widget
                                    All Right Have you advice CRC-32/MPEG-2 calculate function because When I move on widget form Crc 32 calculate error What Can I fixed

                                    mrjjM 1 Reply Last reply
                                    0
                                    • A alonewolfsemmmy

                                      @mrjj
                                      You said didn't work I want to widget on mousehover disable effect widget
                                      All Right Have you advice CRC-32/MPEG-2 calculate function because When I move on widget form Crc 32 calculate error What Can I fixed

                                      mrjjM Offline
                                      mrjjM Offline
                                      mrjj
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #18

                                      @alonewolfsemmmy
                                      Hi
                                      That is hard to guess on as why would a hover eefct break the CRC calculation in first place ?

                                      Did you watch your cpu usage ? is it at 100% ?

                                      1 Reply Last reply
                                      0
                                      • A Offline
                                        A Offline
                                        alonewolfsemmmy
                                        wrote on last edited by
                                        #19

                                        Okay my brother I will try you said cpu usage

                                        1 Reply Last reply
                                        0
                                        • A Offline
                                          A Offline
                                          alonewolfsemmmy
                                          wrote on last edited by
                                          #20

                                          cpuUsage.JPG

                                          @mrjj my brother
                                          SerialPort 5 megabit buadrate cpu Usage

                                          mrjjM 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