Results 1 to 5 of 5

Thread: QWidget and QRects

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2014
    Posts
    94
    Thanks
    5
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QWidget and QRects

    Thanks for the reply.

    I need to paint relatively to the parent width and check if the muse is inside the painted object.

  2. #2
    Join Date
    Feb 2014
    Posts
    94
    Thanks
    5
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QWidget and QRects

    SOLVED

    Thanks for your help and time wysota.

    Cheers!

    Qt Code:
    1. void fluxoCaixaWidget::mouseMoveEvent(QMouseEvent *)
    2. {
    3. if(this->linhaTempo.contains(this->mapFromGlobal(QCursor::pos())))
    4. {
    5. qDebug() << "OK";
    6. this->dentro = true;
    7. }
    8. else
    9. {
    10. qDebug() << "Fora";
    11. this->dentro = false;
    12. }
    13. this->update();
    14. }
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Replies: 1
    Last Post: 30th October 2010, 12:28
  2. Replies: 1
    Last Post: 16th September 2010, 15:57
  3. Replies: 1
    Last Post: 12th April 2010, 12:55
  4. Replies: 3
    Last Post: 1st April 2010, 23:56
  5. Replies: 1
    Last Post: 2nd May 2006, 21:11

Tags for this Thread

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.