Results 1 to 3 of 3

Thread: x11Event() can't listen Button1MotionMask?

  1. #1
    Join Date
    Dec 2006
    Location
    Wuhan, China
    Posts
    14
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default x11Event() can't listen Button1MotionMask?

    I use x11Event() function to listening X11 event. But I find that MotionNotify(Button1MotionMask) never received!
    if(event->type & ButtonPressMask)
    {
    qDebug()<<"Button1Mask";
    }
    }
    else if(event->type & ButtonReleaseMask)
    {
    qDebug()<<"ButtonReleaseMask";
    }
    else if(event->type &Button1MotionMask)
    {
    // never fall in this block!
    qDebug("%x", event->type);
    }
    return false;

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: x11Event() can't listen Button1MotionMask?

    Isn't this event equivalent to testing the left button in mouseMoveEvent()( aka dragging )?
    There is no need testing for that here, in x11Event.

    Reimplement mouseMoveEvent and check there for dragging.

    Regards

  3. #3
    Join Date
    Dec 2006
    Location
    Wuhan, China
    Posts
    14
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: x11Event() can't listen Button1MotionMask?

    Thanks.
    I know the event mouseMoveEvent(), I just to test how x11Event() to work.

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.