Results 1 to 3 of 3

Thread: How to emit mouse press event in QPushButton

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Nov 2010
    Posts
    97
    Thanks
    6
    Thanked 11 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to emit mouse press event in QPushButton

    Quote Originally Posted by dpatel View Post
    Hi,

    I want to send pressed() event to an object of subclass of QPushButton. How can I do that. I see 'emit' keyword to emit signals, but I am not sure how to user that.
    Can someone please explain me.

    Thanks
    I think what you might want is to call "click()" on the button, if what you're trying to do is "press" the button from another class or something.
    This rude guy who doesn't want you to answer his questions.

    Note: An "expert" here is just someone that's posted a lot.

    "The fact of where you do the encapsulation is meaningless." - Qt Certified Developer and forum moderator

  2. The following user says thank you to nroberts for this useful post:

    Cupidvogel (14th February 2016)

Similar Threads

  1. QGraphicsview and mouse press event
    By eva2002 in forum Qt Programming
    Replies: 6
    Last Post: 26th January 2010, 05:04
  2. Mouse hovering or press event not working?
    By qtzcute in forum Newbie
    Replies: 11
    Last Post: 15th July 2009, 10:53
  3. Mouse press event in a QGraphicsScene
    By Lykurg in forum Qt Programming
    Replies: 3
    Last Post: 19th June 2009, 10:28
  4. Mouse press event detection
    By A.H.M. Mahfuzur Rahman in forum Qt Programming
    Replies: 1
    Last Post: 14th June 2009, 13:08
  5. Checking for key press on mouse event
    By Cruz in forum Newbie
    Replies: 1
    Last Post: 24th January 2009, 18:18

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.