Hello RG Team (most likely Michael), I have been looking into to double stepping problem on the transport toolbar.
As a reminder, both the clicked() and triggered() signals are being sent when a
user clicks on the forward / backwards icons.
This causes a single click to make the pointer step two steps.
I have two distinct solutions to solve the double step transport toolbar button
problem.
1) I wrote a complex mechanism to not allow the click() and the Triggered()
signals to activate the stepping -- involves tracking how quickly the events
arrive.
I don't like it and it just add insult to injury given the lengths gone to get
this to work correctly.
2) Instead of using QToolBar::addAction(QAction *) I inserted a QPushButton()
using QToolBar::addWidget(QWidget *).
The QPushButton does not emit a triggered() signal, only the clicked() signal
is emitted.
I got this working, but the style is all messed up. See attachments. The
button is on the right hand side of the toolbar.
If someone is willing to help me set the styles to match the other toolbar
buttons, we could have a more elegant work around.
Any suggestions?
...
Here is the code I used to inject the QPushButton into the Matrix Editor
(MatrixView.cpp) starting at line 2203
QPushButton *btn = new QPushButton();
btn->setIcon(IconLoader().load("step-back"));
btn->setIconSize(QSize(25, 25));
btn->setFlat(true);
connect(btn, SIGNAL(clicked()),
this,
SIGNAL(rewindPlayback()));
transportToolbar->addWidget(btn);
...
Sincerely,
Julie S.
<<attachment: QPushButton.png>>
<<attachment: QPushButton2.png>>
------------------------------------------------------------------------------
_______________________________________________ Rosegarden-devel mailing list [email protected] - use the link below to unsubscribe https://lists.sourceforge.net/lists/listinfo/rosegarden-devel
