Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6330955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:57:59+00:00 2026-05-24T17:57:59+00:00

I am working on an application with two children. One’s a widget that functions

  • 0

I am working on an application with two children. One’s a widget that functions as a toolbar, the second, below, functions as dashboard, on which information would appear. The latter can be shown/hidden with buttons on the former. Here’s a screen-cast of the prototype.

Now I am looking at doing the same but with a motion animation whilst showing/hiding the lower widget.

In short: the effect should be giving the impression the entire application rises or falls progressively when toggling the dashboard.

In details: I would like the height of the lower widget to decrease until it is reduced to 0 and then hidden completely. Likewise it would increase slowly when showing the widget again. In the meanwhile the position of the application should change accordingly so it stays at the bottom of the screen.

How can I do that? I’ve never done animations on Qt before. If you don’t have an answer, do you know of a quality tutorial that could lead me there.

NB: I am using PyQt.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T17:58:00+00:00Added an answer on May 24, 2026 at 5:58 pm

    I think you can get what you want by using a QPropertyAnimation that animates the geometry property of your widget.
    But IMHO this is the window manager’s role to do what you want. Maybe you will have some headaches bypassing it (but I’m maybe wrong).

    After better reading of your question, it seems that you want to use your own components to trigger the hiding/showing so the WM shouldn’t be a problem.

    As a start here is some code that animate a minimizing of a widget (assuming tbw is an instance of the widget you want to animate):

    formerGeometry = QtCore.QRect(tbw.geometry()) # storing previous geometry in order to be able to restore it later
    
    hideAnimation = QtCore.QPropertyAnimation(tbw, "geometry")
    hideAnimation.setDuration(2000) # chose the value that fits you
    hideAnimation.setStartValue(formerGeometry)
    #computing final geometry
    endTopLeftCorner = QtCore.QPoint(tbw.pos() + QtCore.QPoint(0, tbw.height()))
    finalGeometry = QtCore.QRect(endTopLeftCorner, QtCore.QSize(tbw.width(), 0))
    hideAnimation.setEndValue(finalGeometry)
    
    hideAnimation.start()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a solution that has two projects: One ASP.NET web application, and
I am working on an application in which I have two database fields. One
I am working on a simple app tab-bar based application that has two views.
I'm working on a WPF application which should be utilizable with two monitors. In
I'm slowly building my application to a working state. I'm using two functions called
I'm working on a C# application that supports two communications interfaces, each supported by
I am working on an application that involves maintaining consistency between two local directories.
My application's got one horizontal SashForm with two children. The leftmost one should always
I'm working in an application where a third-party has exposed two services one is
I am currently working on an application that periodically (every 30 secs) grabs two

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.