How to catch mouse click event on titlebar area of QGraphicsView



  • I use QGraphicsView and I want to get mouse click event in its titlebar area. But after checking QT assistance it seems no way to get these mouse event except implementing self defined titlebar area. It is not good idea to hack QGraphicsView code to get that event. Does someone has idea on this?
    Thanks.



  • What titlebar area are you talking about? A plain QGV hasn't anything like that.



  • does your titlebar look like this ?

    class TitleBar : public QGraphicsPixmapItem
    {
    public:
    TitleBar(QGraphicsItem *parent = 0);
    .......
    };
    or it s a standard widget no proxyied ?



  • Sorry for unclear description.
    In my application I use QGraphicsWebView and I want to catch mouse clicking event from QGraphicsWebView's titlebar area. I think the top blue area of QGraphicsWebView widget is the "titlebar area". What I expect is to catch mouse event from these area.



  • Override windowFrameEvent, that should do the trick.



  • Thanks for your information and it helps.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.