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. move animation position

move animation position

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 691 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.
  • I Offline
    I Offline
    IknowQT
    wrote on last edited by
    #1

    9fb286b1-6503-41cb-ade8-0e630b59cd93-4.gif

    QPropertyAnimation* anim = new QPropertyAnimation(this, "pos");
    	anim->setDuration(1000);
    	anim->setEasingCurve(QEasingCurve::Type::OutQuart);
    	anim->setStartValue(startP);
    	anim->setEndValue(endP);
    	anim->start(QAbstractAnimation::DeleteWhenStopped);
    

    I've tried moving animation, but it starts animating above the bottom button, so it looks a little bad.
    Can't I just use the position animation to make the bottom menus appear without covering them?

    J.HilkJ 1 Reply Last reply
    0
    • I IknowQT

      9fb286b1-6503-41cb-ade8-0e630b59cd93-4.gif

      QPropertyAnimation* anim = new QPropertyAnimation(this, "pos");
      	anim->setDuration(1000);
      	anim->setEasingCurve(QEasingCurve::Type::OutQuart);
      	anim->setStartValue(startP);
      	anim->setEndValue(endP);
      	anim->start(QAbstractAnimation::DeleteWhenStopped);
      

      I've tried moving animation, but it starts animating above the bottom button, so it looks a little bad.
      Can't I just use the position animation to make the bottom menus appear without covering them?

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      @IknowQT Not really,
      if you move the start position upwards, than the popup will, partially, appear without animation.

      What you could do, is to make sure that the popup and the bottomMenubar/Button are siblings of each other, and that the popup is stackedUnder the menubar, via https://doc.qt.io/qt-5/qwidget.html#stackUnder

      than you should see what you want to see :D


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      I 1 Reply Last reply
      0
      • J.HilkJ J.Hilk

        @IknowQT Not really,
        if you move the start position upwards, than the popup will, partially, appear without animation.

        What you could do, is to make sure that the popup and the bottomMenubar/Button are siblings of each other, and that the popup is stackedUnder the menubar, via https://doc.qt.io/qt-5/qwidget.html#stackUnder

        than you should see what you want to see :D

        I Offline
        I Offline
        IknowQT
        wrote on last edited by IknowQT
        #3

        @J-Hilk

        Class A
        -> Button
        -> Menu

        It is a structure having a button and a menu widget in class a.
        Can you say this is a sibling relationship?
        I used the stackUnder property, but that didn't change anything.

        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