Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Intercepting mouse event
Forum Updated to NodeBB v4.3 + New Features

Intercepting mouse event

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 2.7k 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.
  • S Offline
    S Offline
    smallC
    wrote on last edited by
    #1

    I'm working on plugin for Qt and I'd wonder how could I intercept double-click signal when user double clicks on one of the files listed in navigation pane under Projects?
    Cannot insert image (I have it on my hard drive) so this is the link to the same question on SO:
    http://stackoverflow.com/questions/14232269/intercepting-double-click

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Please ask that on "qt-creator mailing list":http://lists.qt-project.org/mailman/listinfo/qt-creator, too, you'll get better probability of response.

      (Z(:^

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tobias.hunger
        wrote on last edited by
        #3

        You should really direct questions like this to "our mailing list":http://lists.qt-project.org/ or IRC (#qt-creator on freenode network). All devs follow both of these channels, hardly anyone bothers with more than those and asking the devs is bound to be more productive than asking passers by in random places on the internet!

        To answer your question: You can't. The activated() signal of the ProjectTreeView is connected to the openItem(...) method of the ProjectTreeWidget which will open an editor for that file. I do not know what you want to do, but I do not think that it is good if you end up doing something drastically different than opening an editor... that would be very inconsistent.

        You are of course free to register your own editors for your mime types.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          smallC
          wrote on last edited by
          #4

          Hi sierdzio, thanks, will give it a go.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            smallC
            wrote on last edited by
            #5

            @Tobias Hunger
            I'm actually working on a plugin which will in effect ease the way of working with .pro file, which at this moment is purely textual job. I believe that being able to transform it from having to type everything into simply selecting most of the available options would be of great help.
            I'm not sure if you really cannot intercept this event, will try and will post results.
            Thanks.

            1 Reply Last reply
            0
            • T Offline
              T Offline
              tobias.hunger
              wrote on last edited by
              #6

              Why don't you just register your own editor for pro/pri files then? Double-clicking on the pro-files in the projects mode will work fine then. It will also work when opening those files from other places (which won't be the case if you hack into the ProjectTreeWidget).

              PS: There already is a ProFileEditor. Maybe you can just extend that one?

              1 Reply Last reply
              0
              • S Offline
                S Offline
                smallC
                wrote on last edited by
                #7

                @Tobias
                Hey, that may just be what I wanted! Thanks.

                1 Reply Last reply
                0

                • Login

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