Results 1 to 2 of 2

Thread: problem with mouse release on the border, help me!

  1. #1
    Join Date
    Jun 2007
    Posts
    15
    Thanks
    2

    Question problem with mouse release on the border, help me!

    Hi everybody, in my project, after resizing a widget, I want to catch "mouseReleaseEvent(...)" to redraw the whole widget but "mouseReleaseEvent(...)" is only caught inside the widget, not on the border of the widget. I don't want redraw the whole widget when resizing the widget because It makes the program so slow. After releasing the left mouse on the widget, I will redraw the whole widget.

    So, could you help me? Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: problem with mouse release on the border, help me!

    Override the resizeEvent() if you need that. Although when you resize the widget paintEvent() will be called automatically, so properly reimplementing paintEvent() should be enough. There are ways you can use to optimize the redrawing - for example only repaint the part that really needs repainting - look at QPaintEvent::rect(). You can also use Qt::WA_StaticContents and Qt::WA_OpaquePaintEvent attributes if your widget conforms to their requirements.

Similar Threads

  1. Replies: 3
    Last Post: 7th August 2006, 18:24
  2. Problem with Release version
    By jlbrd in forum Installation and Deployment
    Replies: 7
    Last Post: 30th March 2006, 20:45
  3. Sorry another problem. Mouse Buttons.
    By Zephro in forum Qt Programming
    Replies: 14
    Last Post: 24th February 2006, 17:08

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.