Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Qt 5.3.2: Form transitions C++

    General and Desktop
    animation c++ forms slide navigation qt 5.3.2
    2
    3
    1395
    Loading More Posts
    • 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
      PAMikeD last edited by

      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 Reply Quote 0
      • VRonin
        VRonin last edited by 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);
        

        "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 Reply Quote 0
        • P
          PAMikeD @VRonin last edited by

          @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 Reply Quote 0
          • First post
            Last post