Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Implementation advice needed: per-frame sound effect indicators
Chris Hennes last edited by Chris Hennes
The software I'm working on is a simple stop-motion animation package for kids. It's got the ability to add sound effects, up to one per frame. In a normal use-case a student might put in 20-30 sound effects in a 1000 frame movie. Right now the interface has a slider along the bottom edge for moving between already-taken frames. I'd like to add indicators nearby showing where the sound effects are (that is, the frame they start playing at). In an ideal world those indicators would have a tooltip stating their frame number and the sound chosen, and could be clicked on to bring up the SFX editing dialog.
I have three thoughts about how to implement this.
QSliderand manually draw in "tick marks" at the frames that have SFX. Overload the mouse functions to handle the interactivity. Probably use a double-click to edit the SFX. Try to minimize interference with the normal function of the slider.
- Create an entirely separate single widget based on
QGraphicsViewand draw the ticks where I need them. Display it above (or below) the slider so it doesn't interfere. Manually code in the mouse handling.
- Create a widget based on a horizontal layout. Each frame gets a cell. The cells representing SFX get a button added to them. The buttons do their thing. I've never tried making a layout with that many cells, though. It seems kind of sketchy.
Any thoughts on these ideas, or any other suggestions?
If you need to show that many pictures, why not a horizontal QListView with a custom delegate ?
You could also paint there information about the SFX as an "overlay" on the corresponding frames.