Results 1 to 7 of 7

Thread: Focus/Activation problem for widget in nested QGraphicsScenes

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Focus/Activation problem for widget in nested QGraphicsScenes

    I know almost nothing about OpenGL, but the first thing that springs to my mind is: use OpenGL only
    You should be able to add any widget to gl scene and render it in single view.

    Like I've said - I've never done it, but maybe this article will help you.

  2. The following user says thank you to Spitfire for this useful post:

    peers (9th May 2012)

  3. #2
    Join Date
    Apr 2012
    Posts
    6
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Focus/Activation problem for widget in nested QGraphicsScenes

    Quote Originally Posted by Spitfire View Post
    You should be able to add any widget to gl scene and render it in single view.

    Like I've said - I've never done it, but maybe this article will help you.
    What do you mean with single view?

    I know that article, however as I understood it I can only render one openGL scene per graphics scene. But because I need to show several openGL scenes at once I think I need more than one graphics scene. And because I would like to handle these 'inner' scenes like any QGraphicsItem (thats why I add the associated views to the outer scene via a proxy) I need the 'nested' scenes.

    Thanks anyway

  4. #3
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Focus/Activation problem for widget in nested QGraphicsScenes

    What I can't figure out is why you need many scenes?
    It doesn't seem right to me.

    From what I see you want to have gl and q items and widgets in a scene.
    have signle gl scene, add what you want to it and that's it. Where you get other scenes? Is it imposed on you?
    If you want to manipulate group of elements together, create a widget from that elements, or group them together, or use layout in the scene.

    You didn't say what you're trying to do but I'm guessing that nested scenes will be troublesome in many ways and you should think about different solution.

    Anyway, good luck

  5. #4
    Join Date
    Apr 2012
    Posts
    6
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Focus/Activation problem for widget in nested QGraphicsScenes

    I am working on a system which has to display measurement data. This data is of different kind, curves, images, etc., some of it we visualise using OpenGL. The reason for several OpenGL scenes is that we display data from multiple sources in parallel, sometimes we display data from one source in more than one scene because the visualisation of the same data can be done different to see different things in it. This is the motivation for wanting to have different OpenGL scenes in an 'outer' scene.

    The Graphics Scene/View framework provides all the flexibility we need now and it provides enough flexibility for what we want in the future, that is why, at the moment, I try to find out how we can realise our current application using this framework. The only problem I have so far is the described problem with multiple OpenGl scene.

    What I am doing now is to evaluate whether we really need OpenGL. Before we needed it because we had to display image data with a high update rate. The system was designed and first developed almost 10 years ago, that time OpenGL was what we needed. Now, however, I think we could get away with using a QImage as off buffer and then, in the paint routine of a QGraphicsItem, paint modified parts of the QImage. So far my first tests are promising.

    Regards
    Peer

Similar Threads

  1. Multi Widget focus problem with QListView in s60
    By ericleopard in forum Qt Programming
    Replies: 0
    Last Post: 11th July 2011, 04:29
  2. Problem with nested dock (Border Related).
    By pastispast in forum Qt Programming
    Replies: 6
    Last Post: 13th May 2011, 06:49
  3. Replies: 3
    Last Post: 2nd August 2010, 10:12
  4. Replies: 8
    Last Post: 9th July 2010, 00:37
  5. Qt4 widget and nested layout issue.
    By bunjee in forum Qt Programming
    Replies: 12
    Last Post: 18th January 2007, 20:29

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
  •  
Qt is a trademark of The Qt Company.