Results 1 to 2 of 2

Thread: Qt equivalent of some Win32 code in OnMouseMove (mouseMoveEvent in Qt)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2020
    Posts
    4
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Qt equivalent of some Win32 code in OnMouseMove (mouseMoveEvent in Qt)

    I originally posted this in error to the Qwt sub-forum where it's unlikely to be seen. Please could a moderator remove the version in there?

    In the OnMouseMove() mf of a Win32 custom control which I am re-writing for Qt, there is some code that looks like this:

    Qt Code:
    Switch view

    //----- Get the original erase area -----//
    getMarkerRgn(&oldrgn);

    //----- Draw the markers -----//
    :
    :
    getMarkerRgn(&newrgn);

    erasergn.CreateRectRgn(0,0,0,0); //Dummy rgn
    erasergn.CombineRgn(&oldrgn, &newrgn, RGN_DIFF);

    dc.FillRgn(&erasergn, &brush); // Background colour brush

    To copy to clipboard, switch view to plain text mode

    The idea being to erase the previously drawn markers after the new ones are drawn

    What should I be doing in Qt?

    PS is there any Qt equivalent of the Windows OnEraseBackGround() ?
    PPS only three weeks Qt experience so far so please be gentle!

    Many thanks
    David
    Last edited by perdrix; 5th July 2020 at 12:33. Reason: error in title

Similar Threads

  1. Replies: 0
    Last Post: 3rd July 2020, 11:25
  2. Qt equivalent of C++ code
    By aesthetically asthmatic in forum Newbie
    Replies: 1
    Last Post: 24th June 2018, 17:20
  3. Replies: 3
    Last Post: 7th January 2017, 03:33
  4. QByteArray processing (seeking equivalent QT code)
    By pdoria in forum Qt Programming
    Replies: 2
    Last Post: 13th July 2009, 09:40
  5. pixmap onmousemove event help
    By bluesguy82 in forum Qt Programming
    Replies: 11
    Last Post: 9th August 2006, 14:15

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.