Results 1 to 2 of 2

Thread: Designing a "slide-out" effect

  1. #1
    Join Date
    Sep 2007
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Designing a "slide-out" effect

    Hi everyone !

    I'm quite new to QDockWidget and floatable stuff (rather using layouts in an one-window design) and hope you can give me some help.

    I need to design a sort of slide-out effect. I mean: there's a main window, quite normal and simple. And depending on what user wants to show, additional widgets appear from the border of it, sliding out from inside it (they're not showed before they slide out).
    I managed to do something that looks like this with a QDockWidget set to floatable and with no feature. So I get a kind of second window which can be shown or hidden, sliding out with a QTimeLine arrangement. The problem is that this window is always on top of the main window. Then, what happens is that:
    1 - the dock widget shows up, on top of the main window
    2 - it slides out.

    I would like the main window to stay on top of this sliding widget, to keep the desired effect. How can I do this ? I tried activateWindow, stackUnder, giving the StayOnTop hint to the mainWindow...but none of these tries worked. Any idea, anyone ?

    Thanks in advance !

    PS: I'm not afraid of designing the widget myself, so don't hesitate if the idea is not straight-forward, or even a kind of hack

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Designing a "slide-out" effect

    First you might want to try qRollEffect() (or something like that), it's defined in qeffects file (it's not part of public API so you have to look into sources). If that doesn't suit you, you can implement something similar just with a different effect.

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.