Improve responsiveness of the sidebar

I added a zerotimer to make the sidebar emit
currentChanged only after it has been updated as
pressed.
This commit is contained in:
Jens Bache-Wiig
2010-02-18 12:04:00 +01:00
parent 54b2ab7190
commit bd2ba2307b
3 changed files with 25 additions and 6 deletions

View File

@@ -34,6 +34,7 @@
#include <QtGui/QTabBar>
#include <QtGui/QStyleOptionTabV2>
#include <QtCore/QTimeLine>
#include <QtCore/QTimer>
QT_BEGIN_NAMESPACE
class QPainter;
@@ -116,6 +117,7 @@ signals:
public slots:
void updateHover();
void emitCurrentIndex();
private:
static const int m_rounding;
@@ -124,7 +126,7 @@ private:
int m_hoverIndex;
int m_currentIndex;
QList<FancyTab*> m_tabs;
QTimer m_triggerTimer;
QSize tabSizeHint(bool minimum = false) const;
};