Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt 5.3.2: Form transitions C++
QtWS25 Last Chance

Qt 5.3.2: Form transitions C++

Scheduled Pinned Locked Moved General and Desktop
animationc++formsslidenavigationqt 5.3.2
3 Posts 2 Posters 1.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    PAMikeD
    wrote on last edited by
    #1

    Hi,

    I need to slide on and off (like the iOS navigation controller) different .ui fullscreen forms, I've seen in QML the StackView but does something like that exist in the c++ API?

    Thanks,
    Michael

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by VRonin
      #2

      you could use QPropertyAnimation on the pos of the widget.
      this is an extract from an old widget I wrote

      	QParallelAnimationGroup* Animazioni=new QParallelAnimationGroup;
      	QPropertyAnimation* AnimCurrent=new QPropertyAnimation(currentIcon,"pos",Displayer);
      	AnimCurrent->setDuration(DurataAnimazione);
      	AnimCurrent->setEasingCurve(QEasingCurve::Linear);
      	AnimCurrent->setKeyValueAt(0.0,QPoint(0,0));
      	AnimCurrent->setKeyValueAt(1.0,QPoint(-Displayer->width()-10,0));
      	Animazioni->addAnimation(ANimationDuration);
      	QPropertyAnimation* AnimNext=new QPropertyAnimation(NextIcon,"pos",Displayer);
      	AnimNext->setDuration(ANimationDuration);
      	AnimNext->setEasingCurve(QEasingCurve::Linear);
      	AnimNext->setKeyValueAt(1.0,QPoint(0,0));
      	AnimNext->setKeyValueAt(0.0,QPoint(Displayer->width()+10,0));
      	Animazioni->addAnimation(AnimNext);
      	connect(Animazioni,SIGNAL(finished()),this,SLOT(Successiva()));
      	Animazioni->start(QAbstractAnimation::DeleteWhenStopped);
      

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      P 1 Reply Last reply
      0
      • VRoninV VRonin

        you could use QPropertyAnimation on the pos of the widget.
        this is an extract from an old widget I wrote

        	QParallelAnimationGroup* Animazioni=new QParallelAnimationGroup;
        	QPropertyAnimation* AnimCurrent=new QPropertyAnimation(currentIcon,"pos",Displayer);
        	AnimCurrent->setDuration(DurataAnimazione);
        	AnimCurrent->setEasingCurve(QEasingCurve::Linear);
        	AnimCurrent->setKeyValueAt(0.0,QPoint(0,0));
        	AnimCurrent->setKeyValueAt(1.0,QPoint(-Displayer->width()-10,0));
        	Animazioni->addAnimation(ANimationDuration);
        	QPropertyAnimation* AnimNext=new QPropertyAnimation(NextIcon,"pos",Displayer);
        	AnimNext->setDuration(ANimationDuration);
        	AnimNext->setEasingCurve(QEasingCurve::Linear);
        	AnimNext->setKeyValueAt(1.0,QPoint(0,0));
        	AnimNext->setKeyValueAt(0.0,QPoint(Displayer->width()+10,0));
        	Animazioni->addAnimation(AnimNext);
        	connect(Animazioni,SIGNAL(finished()),this,SLOT(Successiva()));
        	Animazioni->start(QAbstractAnimation::DeleteWhenStopped);
        
        P Offline
        P Offline
        PAMikeD
        wrote on last edited by
        #3

        @VRonin Thanks!, this is what I ended up doing in the end, I just wondered if there was a nicer way like StackView.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved