[email protected]
[Top] [All Lists]

Re: QHeader, mouse right click

Subject: Re: QHeader, mouse right click
From: Matthieu Dazy
Date: Wed, 16 Mar 2005 09:43:53 +0100
sebastien dolard wrote:

Is there a solution to have a popup menu on a QHeader ?
I'd say you'll need to subclass QHeader and reimplement the appropriate
event handler to popup your contextual menu. The logical choice would be
to reimplement mouseReleaseEvent(QMouseEvent*) and check the event to
see which button caused the event.
QHeader also inherits contextMenuEvent(QContextMenuEvent*), but the way
QContextMenuEvents are generated is platform-dependent. If you don't
bother with portability, this could be a good alternative.
Matthieu Dazy ([email protected]) -- tel. +33 (0)3 83 67 66 19
Earth Decision Sciences, Nancy         -- http://www.earthdecision.com

List archive and information: http://lists.trolltech.com/qt-interest/

<Prev in Thread] Current Thread [Next in Thread>