30 #include <QGraphicsLinearLayout>
32 #include <QElapsedTimer>
35 static const int MinItemWidth = 276;
56 item->setMinimumWidth(MinItemWidth);
62 item->setMinimumWidth(MinItemWidth);
104 static bool repeat =
false;
105 int interval = keyPressInterval.
isValid() ? keyPressInterval.
elapsed() : 0;
110 if(interval < 250 ) {
130 keyPressInterval.
start();
The QElapsedTimer class provides a fast way to calculate elapsed times.
qint64 elapsed() const noexcept
bool isValid() const noexcept
void setContentsMargins(qreal left, qreal top, qreal right, qreal bottom)
The QGraphicsLinearLayout class provides a horizontal or vertical layout for managing widgets in Grap...
The QKeyEvent class describes a key event.
void setObjectName(const QString &name)
constexpr qreal height() const noexcept
ScrollBar * verticalScrollBar() const
virtual void keyPressEvent(QKeyEvent *event)
void addItem(ListItem *item)
void insertItem(int index, ListItem *item)
void setListItemCaching(bool enable)
ListItem * takeItem(int row)
void setTwoColumns(const bool twoColumns)
SimpleList(QGraphicsWidget *parent=0)
bool listItemCaching() const
ListItem * itemAt(int row)
GeneratorWrapper< T > repeat(size_t repeats, GeneratorWrapper< T > &&generator)
QT_END_INCLUDE_NAMESPACE typedef double qreal
GLenum GLenum GLsizei void * row
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent