QTimeline | A modfication of a Qt Timeline Widget from https | Build Tool library
kandi X-RAY | QTimeline Summary
kandi X-RAY | QTimeline Summary
QTimeline is a collection of Qt Widgets that draw a timeline similar to one you may find in common editorial software. It does not implement much by itself. It has the concept of a keyframe and an errored frame however on their own, those don't mean much other than a coloured mark on the timeline.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Start playback
- Resets the timer
- Start the playback
- End the play
QTimeline Key Features
QTimeline Examples and Code Snippets
Community Discussions
Trending Discussions on QTimeline
QUESTION
I'm using Python 3.8 and PyQt5 to write a GUI with "Designer" installed with the Qt5-Package and then translated (with pyuic5) to a .py file.
Actually I have a fading animation, when the current index of the stacked widget changes (it changes/toggles when clicking the push button).
My Problem... A white background during the animation to the other page of the stacked widget. I want to have it transparent eg. not visible, so that the image in the background is visible (it is located in another file 'resources').
I already tried to set a fixed background to the stacked widget. With this, no white color is visible during animation. However, my goal is to set it transparent to see the background. On some pages I found the info to set the stylesheet to "background:transparent" or to set attribute to "WA_TranslucentBackground", but all of that didn't work for me. The stylesheet background-color: rgba(0,0,0,0) worked neither.
I hope somebody can help me with my problem. If any information is missing please comment. Thank in advance.
UPDATE: One code snippet to test...
There's a very small code snippet that works (I don't remeber from which website I have it). I colored the background green, so the problem is visible. Running the following code with Python 3.8 I got...
It's clearly visible that there I have the same problem with the white background during animation.
...ANSWER
Answered 2020-Jul-04 at 12:09The problem is that rendering a widget doesn't take into account the background of the parent, but only the widget's own background:
If you enable this option, the widget's background is rendered into the target even if autoFillBackground is not set.
This means that render
will use the widget's palette backgroundRole
as background color, no matter if it's "transparent".
Disabling the default DrawWindowBackground
flag won't help you much, even if you fill
the pixmap with Qt.transparent
, since it will overlap on the existing widget, making it "blurred".
The solution is to render the top level window, but only using the widget's geometry:
QUESTION
I am using a QStackedWidget
which has its own enterEvent
and leaveEvent
. When I move my mouse to the QStackedWidget
the enterEvent
sets the current index to 1
and on the leaveEvent
it sets the current index to 0
so that a different widget is shown on mouse enter and mouse leave in the area of QStackedWidget
. It does what I want only if I quickly move my mouse in and out, if I place my mouse too long in the area I get RecursionError: maximum recursion depth exceeded
.
Is this because the widgets are changing so fast that the internal stack can't keep up? My question is "How can I make sure this error doesn't occur? I want to display one widget as long as the mouse is over the QStackedWidget
and when it is not I want to display the original widget."
The following is the code that I modified (Original Source used buttons to set the index and it is PyQt4
)
ANSWER
Answered 2020-Jun-12 at 15:52The recursion occurs because when you start the FaderWidget it changes focus and enterEvent is called again which creates a new FaderWidget.
The solution is to verify that the old index is different from the new index to just create the FadeWidget:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install QTimeline
You can use QTimeline like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page