Results 1 to 3 of 3

Thread: QMouse Events, Why int?

  1. #1
    Join Date
    Jun 2011
    Posts
    203
    Qt products
    Qt4
    Platforms
    MacOS X Windows
    Thanks
    7
    Thanked 4 Times in 3 Posts

    Default QMouse Events, Why int?

    Why are:

    Qt Code:
    1. int globalX () const
    2. int globalY () const
    To copy to clipboard, switch view to plain text mode 
    and

    Qt Code:
    1. int x () const
    2. int y () const
    To copy to clipboard, switch view to plain text mode 

    integers? Is it because everything is in terms of pixels?

  2. #2
    Join Date
    Apr 2012
    Posts
    14
    Qt products
    Qt4
    Platforms
    MacOS X Windows
    Thanked 1 Time in 1 Post

    Default Re: QMouse Events, Why int?

    Yes.

    globalX(), globalY() returns position of mouse event from top left SCREEN corner when x(), y() - from top left WINDOW corner.

  3. #3
    Join Date
    Jun 2011
    Posts
    203
    Qt products
    Qt4
    Platforms
    MacOS X Windows
    Thanks
    7
    Thanked 4 Times in 3 Posts

    Default Re: QMouse Events, Why int?

    Thanks, hmm where the origin was surprised me, thanks for elaborating.

Similar Threads

  1. Events
    By A9am in forum Qt Programming
    Replies: 1
    Last Post: 10th November 2011, 14:08
  2. Qt...Using Events
    By Peppy in forum Qt Programming
    Replies: 5
    Last Post: 27th December 2009, 09:41
  3. Events
    By T0bi4s in forum Newbie
    Replies: 16
    Last Post: 25th November 2009, 22:09
  4. Events
    By SV in forum Qt Programming
    Replies: 0
    Last Post: 21st May 2008, 08:48
  5. Events - how to
    By eleanor in forum Newbie
    Replies: 2
    Last Post: 13th November 2006, 07:23

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.