Results 1 to 3 of 3

Thread: Calling a slot/function immediately after the a Window is shown

  1. #1
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    258
    Thanks
    22
    Thanked 19 Times in 16 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Calling a slot/function immediately after the a Window is shown

    Hi,
    Can you guys tell me how to call a slot just after a window is being shown (must be complete and visible) to the user? I tried overriding setVisible() or handling showEvent() but they are both called before the window is fully shown not afterwards.I actually want an intro animation to begin immediately after the window is shown to the user. My current hack involves using showEvent to trigger a singleShot timer that in turn starts the animation 500 ms after the showEvent is handled. I am not satisfied with the result though. When the window is created in under 500ms, then the animation will lag behind and when it takes longer the animation is already finished when the window is visible to the user. Very ugly! Any solutions?

    Thanks in advance
    momesana

  2. #2
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

  3. #3
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    258
    Thanks
    22
    Thanked 19 Times in 16 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Calling a slot/function immediately after the a Window is shown

    Yep I've read the documentation. What I am really trying to do is to animate the icons in kickoff's tabbar in KDE4. When I click on the start-menu icon Kickoff is made visible. The tabbar is a child of the window so actually I am checking the tabbar's showEvent not the one belonging to the window. Thus it's an internal show event, and to be honest I don't want to modify other classes except the TabBar. Any other ideas :-( ?
    Last edited by momesana; 14th February 2009 at 20:14.

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.