Results 1 to 20 of 30

Thread: subclass the QLabel

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: subclass the QLabel

    hi , u can override the mousPressEvent
    Qt Code:
    1. void QLabel::mousePressEvent(QMouseEvent *evt)
    2. {
    3. qDebug()<<"X"<<evt->x()<<"Y"<<evt->y();
    4. }
    To copy to clipboard, switch view to plain text mode 

    hope it helps
    Bala

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

    ready (25th March 2011)

Similar Threads

  1. Replies: 8
    Last Post: 12th February 2010, 02:41
  2. Replies: 1
    Last Post: 29th September 2009, 19:44
  3. Replies: 1
    Last Post: 2nd August 2008, 15:46
  4. Subclass Pushbutton
    By Smith in forum Newbie
    Replies: 6
    Last Post: 8th December 2007, 12:56
  5. Subclass
    By merry in forum General Programming
    Replies: 2
    Last Post: 1st March 2007, 10:34

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.