Qt Show/Hide widget animation -


The widget I'm trying to implement a show / hidden widget animation is QDockWidget and so is inside QMainWindowLayout.

Using QPropertyAnimation starts working, I'm seeing something like this:

  m_listViewDock-> SetSizePolicy (QSizePolicy :: extension, QSizePolicy :: Fixed); QPropertyAnimation * animation = new QPropertyAnimation (m_listViewDock, "geometry", m_listViewDock); Animation-> SetDuration (1000); QRect G = m_listViewDock-> Geometry (); Animation-> SetStartState (g); G.setHeight (80); Animation-> SetEndState (g); Animation-> Start (QAbstractAnimation :: DeleteWhenStopped);  

Unfortunately this does not do anything. I thought I did not set up my widget layout properly using the designer, but even if I play with the minimum size, I do not even have any results. If I want to play with size then I What kind of size policy should you use?

I'm stuck, it would be great if someone could explain my problem, I'm not sure I'm doing anything wrong ...

To help you Thank you in advance, Boris -

By the way, here QT programmer has used it in QWidgetAnimator, Mainly used for the animation of the Dock widget, I am doing exactly the same ...:

  const quarte_jammitim = _final_g Eometry.isValid () || Widget-> IsWindow ()? _Fin__Eximetry: QPoint (-500 - widget-> width (), -500 - widget-> height ()), widget-> shape ()); #ifdef QT_NO_ANIMATION AnimationMap :: const_iterator it = m_animation_map.constFind (widget); If (it! = M_animation_map.constEnd () & amp;; (* this) - & gt; and value (). ToRect () == Last_Gemitry) Return; QPropertyAnimation * anim = New QPropertyAnimation (widget, "geometry", widget); Anem-> Setdition (Live 200: 0); Anim- & gt; SetEasingCurve (QEasingCurve :: InOutQuad); Anim- & gt; SetEndValue (final_geometry); M_animation_map [widget] = anime; Connect (animation, signal (end ()), slot (animation field)); Anim- & gt; Start (QPropertyAnimation :: DeleteWhenStopped);  

Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -