Results 1 to 2 of 2

Thread: QpaintEvent region problem with QPopupmenus

  1. #1

    Default QpaintEvent region problem with QPopupmenus

    Hi,

    I have the strange problem that, when I click on a popupmenu, fully outside or inside a widget, the widget repaints with an updated region that is is the whole widget instead of a part of the widget.

    Only when I move a windows form over the widget, the updated region is correct. When Qt is the sender of the paintevent, the updated region will fail.

    Has anyone a solution for this ??

    I use Qt 3.3.4
    Last edited by Qtkiller; 20th September 2007 at 15:56.

  2. #2

    Default Re: QpaintEvent region problem with QPopupmenus

    I explain it more.

    I am not sure if Qt is the sender of the event. When I click on a QMenubar,that contains QPopupmenu's, BEFORE the popupmenu is shown there is a complete paintevent of the widget. When I click outside the QMenuBar to close the popupmenu, a new paintevent is generated, while there is no need to do this.

    These are 2 "wild" paintevents that are not needed. The widget is in a QWorkspace, this workspace has as parent a CVBox. This CVBox has as parent a QMainWindow. The QMenubar resides on the QMainWindow.

    EDIT

    problem is solved. Probably a Qt bug. There is nothing wrong with a QPopupMenu, it has todo with the focus. When a form outside the QT application gets the focus, the qt application receives a weird paintevent. Also when a QT application gets focus, a complete paint event occurs. I solved it, thanks to my my colleague, with a own empty implementation of a focusInEvent and focusOutEvent function.
    Last edited by Qtkiller; 21st September 2007 at 12:31.

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.