Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. How to catch mouse click event on titlebar area of QGraphicsView
Forum Updated to NodeBB v4.3 + New Features

How to catch mouse click event on titlebar area of QGraphicsView

Scheduled Pinned Locked Moved Qt WebKit
6 Posts 3 Posters 4.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    ificanfly
    wrote on 29 Dec 2010, 09:31 last edited by
    #1

    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.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dangelog
      wrote on 29 Dec 2010, 11:13 last edited by
      #2

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

      Software Engineer
      KDAB (UK) Ltd., a KDAB Group company

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dguimard
        wrote on 3 Jan 2011, 21:12 last edited by
        #3

        does your titlebar look like this ?

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

        1 Reply Last reply
        0
        • I Offline
          I Offline
          ificanfly
          wrote on 4 Jan 2011, 02:35 last edited by
          #4

          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.

          1 Reply Last reply
          0
          • D Offline
            D Offline
            dangelog
            wrote on 4 Jan 2011, 03:28 last edited by
            #5

            Override windowFrameEvent, that should do the trick.

            Software Engineer
            KDAB (UK) Ltd., a KDAB Group company

            1 Reply Last reply
            0
            • I Offline
              I Offline
              ificanfly
              wrote on 4 Jan 2011, 08:08 last edited by
              #6

              Thanks for your information and it helps.

              1 Reply Last reply
              0

              6/6

              4 Jan 2011, 08:08

              • Login

              • Login or register to search.
              6 out of 6
              • First post
                6/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved