Results 1 to 3 of 3

Thread: Ideas for implementation of a little mouse window

  1. #1
    Join Date
    Oct 2009
    Posts
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Ideas for implementation of a little mouse window

    I want to know your thoughts/ideas on how I can implement this:
    I have a QGraphicsView/Scene project for designing.
    I want to implement a little window following the mouse and showing/prompting for input from the user.
    Look at the example in an autocad 8 environment:
    http://www.softpedia.com/screenshots/AutoCAD_8.png
    A little box saying "Specify Oposite Corner:" is following the mouse giving info and wanting input from the user.

    I first thought to implement a QWidget with my litle dialog (QLabels, and QLineInputs) and use QGraphicsProxyWidget ... but this doesn't work well because the QWidget follows View scale,size. I want to remain the same size despite panning/zooming on the view.

    Any ideas?

  2. #2
    Join Date
    Oct 2009
    Posts
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Ideas for implementation of a little mouse window

    Maybe I could use drawForeGround() and my mousebox will be drawen by hand by simple painter elements without the use of a qwidget?

    Better ideas?

  3. #3
    Join Date
    Oct 2009
    Posts
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Ideas for implementation of a little mouse window

    Anyway, I had no answer to this post, so I chose an implementation myshelf.

    I used paintEvent of my QGraphicsView to paint over the QGV and it works great.

    I have to think now a way to use lineinput inside this QWidget overlay to key input one value.
    Maybe QLineInput over the widget or full new implementation of an input in the overlaying widget If I not make it.

    Here is the screenshot of what I made:

    http://imagebin.org/69110

Similar Threads

  1. How to get mouse click events outside the Qt window?
    By montylee in forum Qt Programming
    Replies: 11
    Last Post: 13th July 2015, 22:55
  2. Catching Mouse Events on Top-Level Window
    By andyp in forum Qt Programming
    Replies: 6
    Last Post: 8th September 2009, 11:26
  3. Ignore mouse click on window activation
    By shentian in forum Qt Programming
    Replies: 2
    Last Post: 22nd June 2009, 19:08
  4. Replies: 11
    Last Post: 15th July 2008, 14:11
  5. Replies: 2
    Last Post: 24th July 2006, 19:36

Tags for this Thread

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.