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. UnderMouse() signal ?
Forum Updated to NodeBB v4.3 + New Features

UnderMouse() signal ?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 2.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.
  • R Offline
    R Offline
    roosaw
    wrote on last edited by
    #1

    Hi, i wanna set QPushButton above others after pointing it by mouse.
    I found:
    underMouse () const : bool
    and
    raise()
    Ok, so i would do :
    @connect(but, SIGNAL(underMouse()),but, SLOT(raise()));@
    but there is no signal underMouse().
    Object::connect: No such signal QPushButton::underMouse() in window.cpp:8976

    So how can i use that in whole time of running program?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      situ117
      wrote on last edited by
      #2

      Try reimplementing this function in your own subclass of QPushButton:

      http://doc.qt.nokia.com/4.7-snapshot/qabstractbutton.html#mouseMoveEvent

      1 Reply Last reply
      0
      • B Offline
        B Offline
        baysmith
        wrote on last edited by
        #3

        Alternatively, you can install an event filter which looks for enter and leave events.

        Nokia Certified Qt Specialist.

        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