44 #ifndef QT_NO_COMBOBOX 63 #include <private/qapplication_p.h> 64 #include <private/qcombobox_p.h> 65 #include <private/qabstractitemmodel_p.h> 66 #include <private/qabstractscrollarea_p.h> 67 #include <private/qsoftkeymanager_p.h> 70 #include <private/qt_x11_p.h> 72 #if defined(Q_WS_MAC) && !defined(QT_NO_EFFECTS) && !defined(QT_NO_STYLE_MAC) 73 #include <private/qcore_mac_p.h> 75 #include <private/qt_cocoa_helpers_mac_p.h> 78 # include <private/qeffects_p.h> 81 #include "private/qt_s60_p.h" 83 #ifndef QT_NO_ACCESSIBILITY 95 sizeAdjustPolicy(
QComboBox::AdjustToContentsOnFirstShow),
96 minimumContentsLength(0),
99 duplicatesEnabled(false),
105 arrowState(
QStyle::State_None),
106 hoverControl(
QStyle::SC_None),
108 indexBeforeChange(-1)
127 menuOption.
palette = resolvedpalette;
129 if (mCombo->window()->isActiveWindow())
138 menuOption.
checked = mCombo->currentIndex() == index.
row();
145 switch (variant.
type()) {
151 pixmap.
fill(qvariant_cast<QColor>(variant));
152 menuOption.
icon = pixmap;
174 menuOption.
font = mCombo->font();
183 #ifdef QT_KEYPAD_NAVIGATION 184 void QComboBoxPrivate::_q_completerActivated()
187 if ( QApplication::keypadNavigationEnabled()
191 q->setEditFocus(
false);
203 q->initStyleOption(&opt);
230 #elif defined Q_WS_X11 248 q->update(lastHoverRect);
259 q->initStyleOption(&opt);
277 const int count = q->count();
278 const int iconWidth = q->iconSize().width() + 4;
281 for (
int i = 0; i < count; ++i) {
282 const int textWidth = fontMetrics.
width(q->itemText(i));
283 if (q->itemIcon(i).isNull())
284 width = (
qMax(width, textWidth));
286 width = (
qMax(width, textWidth + iconWidth));
290 q->initStyleOption(&opt);
301 int count = q->count();
313 for (
int i = 0; i < count; ++i) {
314 if (!q->itemIcon(i).isNull()) {
324 for (
int i = 0; i < count && !hasIcon; ++i)
325 hasIcon = !q->itemIcon(i).isNull();
330 for (
int i = 0; i < count && !hasIcon; ++i)
331 hasIcon = !q->itemIcon(i).isNull();
345 q->initStyleOption(&opt);
360 q->initStyleOption(&opt);
372 if (timerEvent->
timerId() == adjustSizeTimer.timerId()) {
373 adjustSizeTimer.stop();
375 combo->updateGeometry();
405 view->clearSelection();
410 :
QFrame(parent,
Qt::
Popup), combo(parent), view(0), top(0), bottom(0)
461 #ifndef QT_NO_SCROLLBAR 472 #ifndef QT_NO_SCROLLBAR 499 #endif // QT_NO_SCROLLBAR 530 #ifndef QT_NO_SCROLLBAR 554 #ifndef QT_NO_SCROLLBAR 568 #ifndef QT_NO_SCROLLBAR 577 #ifdef QT_SOFTKEYS_ENABLED 593 #ifndef QT_NO_TABLEVIEW 619 if (bottomSpacer && bottomSpacer != topSpacer)
632 #ifdef QT_SOFTKEYS_ENABLED 647 switch (static_cast<QKeyEvent*>(e)->key()) {
650 #ifdef QT_KEYPAD_NAVIGATION 711 #ifndef QT_NO_GRAPHICSVIEW 999 if (!q->isEditable())
1012 container->itemView()->setModel(
model);
1014 updateDelegate(
true);
1015 updateLayoutDirection();
1016 updateViewContainerPaletteAndOpacity();
1035 if (inserting || topLeft.
parent() != root)
1040 adjustComboBoxSize();
1041 q->updateGeometry();
1047 updateLineEditGeometry();
1051 #ifndef QT_NO_ACCESSIBILITY 1059 if (inserting || parent != root)
1064 adjustComboBoxSize();
1065 q->updateGeometry();
1069 if (start == 0 && (end - start + 1) == q->count() && !
currentIndex.isValid()) {
1070 q->setCurrentIndex(0);
1091 adjustComboBoxSize();
1092 q->updateGeometry();
1098 q->setCurrentIndex(
qMin(q->count() - 1,
qMax(indexBeforeChange, 0)));
1103 updateLineEditGeometry();
1117 q->initStyleOption(&opt);
1122 container->setPalette(menu.
palette());
1127 container->setPalette(q->palette());
1128 container->setWindowOpacity(1.0);
1149 option->
frame =
d->frame;
1155 option->
state |=
d->arrowState;
1159 if (
d->currentIndex.isValid()) {
1164 if (
d->container &&
d->container->isVisible())
1175 q->initStyleOption(&opt);
1178 if (!q->itemIcon(q->currentIndex()).
isNull()) {
1179 QRect comboRect(editRect);
1180 editRect.
setWidth(editRect.
width() - q->iconSize().width() - 4);
1182 editRect.
size(), comboRect);
1191 #ifndef QT_NO_COMPLETER 1206 q->setCurrentIndex(index);
1225 index = q->findText(text, matchFlags());
1227 q->setCurrentIndex(index);
1245 q->setItemText(q->currentIndex(),
text);
1247 index = q->currentIndex() + 1;
1249 index = q->currentIndex();
1253 for (
int i=0; i< q->count(); i++, index++ ) {
1263 q->insertItem(index, text);
1264 q->setCurrentIndex(index);
1288 emit q->activated(index.
row());
1289 emit q->activated(text);
1298 emit q->highlighted(index.
row());
1299 emit q->highlighted(text);
1305 emit q->currentIndexChanged(index.
row());
1307 #ifndef QT_NO_ACCESSIBILITY 1332 this,
SLOT(_q_modelDestroyed()));
1353 return d->maxVisibleItems;
1360 qWarning(
"QComboBox::setMaxVisibleItems: " 1361 "Invalid max visible items (%d) must be >= 0", maxItems);
1364 d->maxVisibleItems = maxItems;
1379 return d->model->rowCount(
d->root);
1401 qWarning(
"QComboBox::setMaxCount: Invalid count (%d) must be >= 0", max);
1406 d->model->removeRows(max,
count() - max,
d->root);
1417 #ifndef QT_NO_COMPLETER 1446 return d->autoCompletion;
1461 #ifdef QT_KEYPAD_NAVIGATION 1462 if (QApplication::keypadNavigationEnabled() && !enable &&
isEditable())
1463 qWarning(
"QComboBox::setAutoCompletion: auto completion is mandatory when combo box editable");
1466 d->autoCompletion = enable;
1470 if (
d->lineEdit->completer())
1473 d->completer->setCaseSensitivity(
d->autoCompletionCaseSensitivity);
1475 d->completer->setCompletionColumn(
d->modelColumn);
1476 d->lineEdit->setCompleter(
d->completer);
1477 d->completer->setWidget(
this);
1479 d->lineEdit->setCompleter(0);
1510 return d->autoCompletionCaseSensitivity;
1524 d->autoCompletionCaseSensitivity = sensitivity;
1525 if (
d->lineEdit &&
d->lineEdit->completer())
1526 d->lineEdit->completer()->setCaseSensitivity(sensitivity);
1529 #endif // QT_NO_COMPLETER 1546 return d->duplicatesEnabled;
1552 d->duplicatesEnabled = enable;
1577 result =
d->model->match(start, role, data, 1, flags);
1600 return d->insertPolicy;
1606 d->insertPolicy = policy;
1625 return d->sizeAdjustPolicy;
1631 if (policy ==
d->sizeAdjustPolicy)
1634 d->sizeAdjustPolicy = policy;
1636 d->adjustComboBoxSize();
1657 return d->minimumContentsLength;
1663 if (characters ==
d->minimumContentsLength || characters < 0)
1666 d->minimumContentsLength = characters;
1672 d->adjustComboBoxSize();
1692 if (
d->iconSize.isValid())
1696 return QSize(iconWidth, iconWidth);
1702 if (size ==
d->iconSize)
1726 return d->lineEdit != 0;
1740 q->initStyleOption(&opt);
1742 if (force || qobject_cast<QComboBoxDelegate *>(q->itemDelegate()))
1745 if (force || qobject_cast<QComboMenuDelegate *>(q->itemDelegate()))
1754 return QIcon(qvariant_cast<QPixmap>(decoration));
1765 d->updateDelegate();
1771 d->viewContainer()->updateScrollers();
1778 d->viewContainer()->updateScrollers();
1782 d->lineEdit->hide();
1783 d->lineEdit->deleteLater();
1787 d->viewContainer()->updateTopBottomMargin();
1801 qWarning(
"QComboBox::setLineEdit: cannot set a 0 line edit");
1805 if (edit ==
d->lineEdit)
1812 if (
d->lineEdit->parent() !=
this)
1813 d->lineEdit->setParent(
this);
1820 d->lineEdit->setFrame(
false);
1822 d->lineEdit->setFocusProxy(
this);
1824 #ifndef QT_NO_COMPLETER 1828 #ifdef QT_KEYPAD_NAVIGATION 1829 #ifndef QT_NO_COMPLETER 1830 if (QApplication::keypadNavigationEnabled()) {
1844 d->updateLayoutDirection();
1845 d->updateLineEditGeometry();
1847 d->lineEdit->show();
1864 #ifndef QT_NO_VALIDATOR 1875 d->lineEdit->setValidator(v);
1887 return d->lineEdit ?
d->lineEdit->validator() : 0;
1889 #endif // QT_NO_VALIDATOR 1891 #ifndef QT_NO_COMPLETER 1908 d->lineEdit->setCompleter(c);
1927 return d->lineEdit ?
d->lineEdit->completer() : 0;
1930 #endif // QT_NO_COMPLETER 1957 qWarning(
"QComboBox::setItemDelegate: cannot set a 0 delegate");
1989 qWarning(
"QComboBox::setModel: cannot set a 0 model");
1993 #ifndef QT_NO_COMPLETER 1994 if (
d->lineEdit &&
d->lineEdit->completer()
1995 &&
d->lineEdit->completer() ==
d->completer)
1996 d->lineEdit->completer()->setModel(model);
2002 this,
SLOT(_q_updateIndexBeforeChange()));
2006 this,
SLOT(_q_updateIndexBeforeChange()));
2010 this,
SLOT(_q_modelDestroyed()));
2012 this,
SLOT(_q_updateIndexBeforeChange()));
2014 this,
SLOT(_q_modelReset()));
2015 if (
d->model->QObject::parent() ==
this)
2024 this,
SLOT(_q_updateIndexBeforeChange()));
2028 this,
SLOT(_q_updateIndexBeforeChange()));
2032 this,
SLOT(_q_modelDestroyed()));
2034 this,
SLOT(_q_updateIndexBeforeChange()));
2036 this,
SLOT(_q_modelReset()));
2039 d->container->itemView()->setModel(model);
2041 bool currentReset =
false;
2047 currentReset =
true;
2099 return d->currentIndex.row();
2105 QModelIndex mi =
d->model->index(index,
d->modelColumn,
d->root);
2106 d->setCurrentIndex(mi);
2123 QString newText = q->itemText(normalized.
row());
2126 updateLineEditGeometry();
2151 return d->lineEdit->text();
2152 else if (
d->currentIndex.isValid())
2153 return d->itemText(
d->currentIndex);
2164 QModelIndex mi =
d->model->index(index,
d->modelColumn,
d->root);
2165 return d->itemText(mi);
2174 QModelIndex mi =
d->model->index(index,
d->modelColumn,
d->root);
2175 return d->itemIcon(mi);
2185 QModelIndex mi =
d->model->index(index,
d->modelColumn,
d->root);
2186 return d->model->data(mi, role);
2221 int itemCount =
count();
2222 index =
qBound(0, index, itemCount);
2223 if (index >=
d->maxCount)
2232 m->insertRow(index, item);
2235 d->inserting =
true;
2236 if (
d->model->insertRows(index, 1,
d->root)) {
2237 QModelIndex item =
d->model->index(index,
d->modelColumn,
d->root);
2245 if (!values.
isEmpty())
d->model->setItemData(item, values);
2247 d->inserting =
false;
2248 d->_q_rowsInserted(
d->root, index, index);
2251 d->inserting =
false;
2255 if (itemCount >
d->maxCount)
2256 d->model->removeRows(itemCount - 1, itemCount -
d->maxCount,
d->root);
2275 int insertCount =
qMin(
d->maxCount - index, list.
count());
2276 if (insertCount <= 0)
2283 for (
int i = 0; i < insertCount; ++i)
2287 d->inserting =
true;
2288 if (
d->model->insertRows(index, insertCount,
d->root)) {
2290 for (
int i = 0; i < insertCount; ++i) {
2291 item =
d->model->index(i+index,
d->modelColumn,
d->root);
2294 d->inserting =
false;
2295 d->_q_rowsInserted(
d->root, index, index + insertCount - 1);
2297 d->inserting =
false;
2302 if (mc >
d->maxCount)
2303 d->model->removeRows(
d->maxCount, mc -
d->maxCount,
d->root);
2323 int itemCount =
count();
2324 index =
qBound(0, index, itemCount);
2325 if (index >=
d->maxCount)
2340 if (index < 0 || index >=
count())
2342 d->model->removeRows(index, 1,
d->root);
2351 QModelIndex item =
d->model->index(index,
d->modelColumn,
d->root);
2363 QModelIndex item =
d->model->index(index,
d->modelColumn,
d->root);
2376 QModelIndex item =
d->model->index(index,
d->modelColumn,
d->root);
2378 d->model->setData(item, value, role);
2404 qWarning(
"QComboBox::setView: cannot set a 0 view");
2408 if (itemView->
model() !=
d->model)
2410 d->viewContainer()->setItemView(itemView);
2419 return d->recomputeSizeHint(
d->minimumSizeHint);
2435 return d->recomputeSizeHint(
d->sizeHint);
2453 #ifdef QT_KEYPAD_NAVIGATION 2454 #ifndef QT_NO_COMPLETER 2455 if (QApplication::keypadNavigationEnabled() &&
d->completer) {
2458 d->completer->complete();
2477 QRect screen = qt_TRect2QRect(static_cast<CEikAppUi*>(S60->appUi())->ClientRect());
2481 int belowHeight = screen.
bottom() - below.y();
2483 int aboveHeight = above.
y() - screen.
y();
2492 #ifndef QT_NO_TREEVIEW 2499 for (
int i = 0; i <
d->model->rowCount(parent); ++i) {
2500 QModelIndex idx =
d->model->index(i,
d->modelColumn, parent);
2504 #ifndef QT_NO_TREEVIEW 2505 if (
d->model->hasChildren(idx) && treeView && treeView->
isExpanded(idx))
2509 if (!usePopup && count >=
d->maxVisibleItems) {
2515 listRect.setHeight(listHeight);
2520 int heightMargin = 2*container->
spacing();
2523 int marginTop, marginBottom;
2525 heightMargin += marginTop + marginBottom;
2531 heightMargin += marginTop + marginBottom;
2533 listRect.setHeight(listRect.height() + heightMargin);
2542 const int diff =
d->computeWidthHint() -
width();
2544 listRect.setWidth(listRect.width() +
diff);
2550 listRect.setSize( listRect.size().expandedTo(container->
minimumSize())
2554 if (boundToScreen) {
2555 if (listRect.width() > screen.
width() )
2556 listRect.setWidth(screen.
width());
2558 below.setX(screen.
x() + screen.
width() - listRect.width());
2559 above.
setX(screen.
x() + screen.
width() - listRect.width());
2562 below.setX(screen.
x());
2563 above.
setX(screen.
x());
2569 listRect.moveLeft(above.
x());
2575 const int offset = listRect.
top() - currentItemRect.
top();
2576 listRect.moveTop(above.
y() + offset - listRect.top());
2583 const int height = !boundToScreen ? listRect.height() :
qMin(listRect.height(), screen.
height());
2584 listRect.setHeight(height);
2586 if (boundToScreen) {
2587 if (listRect.top() < screen.
top())
2588 listRect.moveTop(screen.
top());
2589 if (listRect.bottom() > screen.
bottom())
2590 listRect.moveBottom(screen.
bottom());
2595 listRect.moveBottom(screen.
bottom());
2597 TRect staConTopRect = TRect();
2598 AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EStaconTop, staConTopRect);
2599 listRect.setWidth(screen.
height());
2601 listRect.moveCenter(screen.
center());
2602 if (staConTopRect.IsEmpty() && AknLayoutUtils::CbaLocation() != AknLayoutUtils::EAknCbaLocationBottom) {
2605 listRect.setLeft(screen.
left());
2609 }
else if (!boundToScreen || listRect.height() <= belowHeight) {
2610 listRect.moveTopLeft(below);
2611 }
else if (listRect.height() <= aboveHeight) {
2612 listRect.moveBottomLeft(above);
2613 }
else if (belowHeight >= aboveHeight) {
2614 listRect.setHeight(belowHeight);
2615 listRect.moveTopLeft(below);
2617 listRect.setHeight(aboveHeight);
2618 listRect.moveBottomLeft(above);
2629 if (needHorizontalScrollBar) {
2630 listRect.adjust(0, 0, 0, sb->
height());
2638 #if defined(Q_WS_WIN) && !defined(QT_NO_EFFECTS) 2639 bool scrollDown = (listRect.topLeft() == below);
2669 #ifdef QT_KEYPAD_NAVIGATION 2670 if (QApplication::keypadNavigationEnabled())
2671 view()->setEditFocus(
true);
2688 if (
d->container &&
d->container->isVisible()) {
2689 #if !defined(QT_NO_EFFECTS) 2690 d->model->blockSignals(
true);
2691 d->container->itemView()->blockSignals(
true);
2692 d->container->blockSignals(
true);
2696 if (selectionModel && selectionModel->
hasSelection()) {
2715 #if defined(Q_WS_MAC) 2720 d->model->blockSignals(
false);
2721 d->container->itemView()->blockSignals(
false);
2722 d->container->blockSignals(
false);
2725 #endif // QT_NO_EFFECTS 2727 d->container->hide();
2729 #ifdef QT_KEYPAD_NAVIGATION 2733 d->_q_resetButton();
2745 d->model->removeRows(0,
d->model->rowCount(
d->root),
d->root);
2746 #ifndef QT_NO_ACCESSIBILITY 2767 d->lineEdit->clear();
2768 #ifndef QT_NO_ACCESSIBILITY 2780 d->lineEdit->setText(text);
2781 #ifndef QT_NO_ACCESSIBILITY 2794 d->lineEdit->event(e);
2795 #ifndef QT_NO_COMPLETER 2796 if (
d->lineEdit->completer())
2797 d->lineEdit->completer()->setWidget(
this);
2810 d->lineEdit->event(e);
2817 switch (e->
type()) {
2819 d->updateDelegate();
2824 d->minimumSizeHint =
QSize();
2825 d->updateLayoutDirection();
2827 d->updateLineEditGeometry();
2836 QRect screen = qt_TRect2QRect(static_cast<CEikAppUi*>(S60->appUi())->ClientRect());
2844 listRect.moveBottom(screen.
bottom());
2846 TRect staConTopRect = TRect();
2847 AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EStaconTop, staConTopRect);
2848 listRect.setWidth(listRect.height());
2850 listRect.moveCenter(screen.
center());
2851 if (staConTopRect.IsEmpty() && AknLayoutUtils::CbaLocation() != AknLayoutUtils::EAknCbaLocationBottom) {
2854 listRect.setLeft(screen.
left());
2858 d->container->setGeometry(listRect);
2870 d->updateViewContainerPaletteAndOpacity();
2875 d->viewContainer()->setFont(
font());
2877 d->updateLineEditGeometry();
2892 if (
d->viewContainer() &&
d->viewContainer()->isVisible())
2895 d->updateLineEditGeometry();
2925 d->shownOnce =
true;
2943 switch(event->
type()) {
2946 d->updateLayoutDirection();
2947 d->updateLineEditGeometry();
2952 if (
const QHoverEvent *he = static_cast<const QHoverEvent *>(event))
2953 d->updateHoverControl(he->pos());
2957 return d->lineEdit->event(event);
2959 #ifdef QT_KEYPAD_NAVIGATION 2960 case QEvent::EnterEditFocus:
2962 setEditFocus(
false);
2964 d->lineEdit->event(event);
2966 case QEvent::LeaveEditFocus:
2968 d->lineEdit->event(event);
2988 && !
d->viewContainer()->isVisible()) {
2991 #ifdef QT_KEYPAD_NAVIGATION 2999 #ifdef QT_KEYPAD_NAVIGATION 3004 #ifdef QT_KEYPAD_NAVIGATION 3006 d->lineEdit->event(e);
3031 #ifndef QT_NO_COMPLETER 3033 &&
d->lineEdit->completer()
3034 &&
d->lineEdit->completer()->popup()
3035 &&
d->lineEdit->completer()->popup()->isVisible()) {
3037 d->lineEdit->event(e);
3042 enum Move { NoMove=0 , MoveUp , MoveDown , MoveFirst , MoveLast};
3051 #ifdef QT_KEYPAD_NAVIGATION 3052 if (QApplication::keypadNavigationEnabled())
3066 #ifdef QT_KEYPAD_NAVIGATION 3067 if (QApplication::keypadNavigationEnabled())
3098 #ifdef QT_KEYPAD_NAVIGATION 3100 if (QApplication::keypadNavigationEnabled()
3101 && (!hasEditFocus() || !
d->lineEdit)) {
3108 if (QApplication::keypadNavigationEnabled() && !hasEditFocus())
3112 if (QApplication::keypadNavigationEnabled()) {
3113 if (!hasEditFocus() || !
d->lineEdit)
3123 d->keyboardSearchString(e->
text());
3129 if (move != NoMove) {
3143 while ((newIndex >= 0) && !(
d->model->flags(
d->model->index(newIndex,
d->modelColumn,
d->root)) &
Qt::ItemIsEnabled))
3153 d->emitActivated(
d->currentIndex);
3155 }
else if (
d->lineEdit) {
3156 d->lineEdit->event(e);
3168 d->lineEdit->event(e);
3174 #ifndef QT_NO_WHEELEVENT 3178 if (!
d->viewContainer()->isVisible()) {
3181 if (e->
delta() > 0) {
3183 while ((newIndex >= 0) && !(
d->model->flags(
d->model->index(newIndex,
d->modelColumn,
d->root)) &
Qt::ItemIsEnabled))
3193 d->emitActivated(
d->currentIndex);
3200 #ifndef QT_NO_CONTEXTMENU 3210 d->lineEdit->event(e);
3211 d->lineEdit->setContextMenuPolicy(p);
3214 #endif // QT_NO_CONTEXTMENU 3235 adjustComboBoxSize();
3236 q->updateGeometry();
3247 d->lineEdit->event(e);
3263 return d->lineEdit->inputMethodQuery(query);
3489 return d->modelColumn;
3495 d->modelColumn = visibleColumn;
3499 #ifndef QT_NO_COMPLETER 3500 if (
d->lineEdit &&
d->lineEdit->completer()
3501 &&
d->lineEdit->completer() ==
d->completer)
3502 d->lineEdit->completer()->setCompletionColumn(visibleColumn);
3555 #include "moc_qcombobox.cpp" 3557 #endif // QT_NO_COMBOBOX The QVariant class acts like a union for the most common Qt data types.
void focusOutEvent(QFocusEvent *e)
Reimplemented Function
void scrollItemView(int action)
static QRect alignedRect(Qt::LayoutDirection direction, Qt::Alignment alignment, const QSize &size, const QRect &rectangle)
Returns a new rectangle of the specified size that is aligned to the given rectangle according to the...
int findData(const QVariant &data, int role=Qt::UserRole, Qt::MatchFlags flags=static_cast< Qt::MatchFlags >(Qt::MatchExactly|Qt::MatchCaseSensitive)) const
Returns the index of the item containing the given data for the given role; otherwise returns -1...
void setSingleShot(bool singleShot)
bool updateHoverControl(const QPoint &pos)
void keyboardSearchString(const QString &text)
QString itemText(const QModelIndex &index) const
bool event(QEvent *event)
Reimplemented Function
QAbstractItemModel * model
static void updateAccessibility(QObject *, int who, Event reason)
Notifies accessibility clients about a change in object's accessibility information.
void showEvent(QShowEvent *e)
This event handler can be reimplemented in a subclass to receive widget show events which are passed ...
void focusInEvent(QFocusEvent *e)
Reimplemented Function
The QAbstractItemDelegate class is used to display and edit data items from a model.
int row() const
Returns the row this persistent model index refers to.
int width(const QString &, int len=-1) const
Returns the width in pixels of the first len characters of text.
void setSelectionMode(QAbstractItemView::SelectionMode mode)
static QAbstractItemModel * staticEmptyModel()
The QKeyEvent class describes a key event.
QLayoutItem * itemAt(int) const
Reimplemented Function
void setInsertPolicy(InsertPolicy policy)
The QItemSelectionModel class keeps track of a view's selected items.
void keyPressEvent(QKeyEvent *e)
Reimplemented Function
static QString standardSoftKeyText(StandardSoftKey standardKey)
SubControl
This enum describes the available sub controls.
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
The QFontMetrics class provides font metrics information.
The QBoxLayout class lines up child widgets horizontally or vertically.
void setItemDelegate(QAbstractItemDelegate *delegate)
Sets the item delegate for the popup list view.
#define QT_END_NAMESPACE
This macro expands to.
QSize iconSize
the icon size for the current item of the combo box
QPointer< QWidget > widget
static QString fromAscii(const char *, int size=-1)
Returns a QString initialized with the first size characters from the string str. ...
QString currentText() const
void drawControl(QStyle::ControlElement ce, const QStyleOption &opt)
Use the widget's style to draw a control element ce specified by QStyleOption option.
bool frame
whether the combo box has a frame
QVariant data(int role=Qt::DisplayRole) const
Returns the data for the given role for the item referred to by the index.
SizeAdjustPolicy sizeAdjustPolicy() const
QStyle::State state
the style flags that are used when drawing the control
void keyReleaseEvent(QKeyEvent *e)
Reimplemented Function
virtual QRect visualRect(const QModelIndex &index) const =0
Returns the rectangle on the viewport occupied by the item at index.
void setSizeAdjustPolicy(SizeAdjustPolicy policy)
The QWheelEvent class contains parameters that describe a wheel event.
virtual QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc, const QWidget *widget=0) const =0
Returns the rectangle containing the specified subControl of the given complex control (with the styl...
bool autoCompletion() const
static QSize globalStrut()
void setMinimumContentsLength(int characters)
void showEvent(QShowEvent *e)
Reimplemented Function
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option=0, const QWidget *widget=0) const =0
Returns the value of the given pixel metric.
virtual void setRootIndex(const QModelIndex &index)
Sets the root item to the item at the given index.
QString & replace(int i, int len, QChar after)
QString currentText
the text for the current item of the combo box
void inputMethodEvent(QInputMethodEvent *)
Reimplemented Function
The QHoverEvent class contains parameters that describe a mouse event.
QObjectUserData * userData(uint id) const
void setIconSize(const QSize &size)
void removeEventFilter(QObject *)
Removes an event filter object obj from this object.
void paintEvent(QPaintEvent *e)
Reimplemented Function
void setEditTriggers(EditTriggers triggers)
void mousePressEvent(QMouseEvent *e)
Reimplemented Function
SizeAdjustPolicy
This enum specifies how the size hint of the QComboBox should adjust when new content is added or con...
void end(bool mark)
Moves the text cursor to the end of the line unless it is already there.
QString toString() const
Returns the variant as a QString if the variant has type() String , Bool , ByteArray ...
virtual int styleHint(StyleHint stylehint, const QStyleOption *opt=0, const QWidget *widget=0, QStyleHintReturn *returnData=0) const =0
Returns an integer representing the specified style hint for the given widget described by the provid...
const QItemSelection selection() const
Returns the selection ranges stored in the selection model.
void _q_itemSelected(const QModelIndex &item)
QSize expandedTo(const QSize &) const
Returns a size holding the maximum width and height of this size and the given otherSize.
int left() const
Returns the x-coordinate of the rectangle's left edge.
void insertSpacing(int index, int size)
Inserts a non-stretchable space (a QSpacerItem) at position index, with size size.
void deselect()
Deselects any selected text.
int width() const
Returns the width of the rectangle.
void setModelColumn(int visibleColumn)
void triggerAction(SliderAction action)
Triggers a slider action.
QIcon currentIcon
the icon for the current item of the combo box
The QCompleter class provides completions based on an item model.
bool activate()
Redoes the layout for parentWidget() if necessary.
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
void setCurrentIndex(int index)
The QStack class is a template class that provides a stack.
void initStyleOption(QStyleOptionComboBox *option) const
Initialize option with the values from this QComboBox.
void setItemText(int index, const QString &text)
Sets the text for the item on the given index in the combobox.
int count(const T &t) const
Returns the number of occurrences of value in the list.
static QPalette palette()
Returns the application palette.
QStyle::SubControls activeSubControls
This variable holds a bitwise OR of the sub-controls that are active for the complex control...
The QStandardItemModel class provides a generic model for storing custom data.
void setItemData(int index, const QVariant &value, int role=Qt::UserRole)
Sets the data role for the item on the given index in the combobox to the specified value...
bool editable
whether or not the combobox is editable or not
bool isExpanded(const QModelIndex &index) const
Returns true if the model item index is expanded; otherwise returns false.
int height() const
Returns the height of the rectangle.
QAbstractItemView * itemView() const
int bottom() const
Returns the y-coordinate of the rectangle's bottom edge.
QSize recomputeSizeHint(QSize &sh) const
The QString class provides a Unicode character string.
QFontMetrics fontMetrics
the font metrics that should be used when drawing text in the control
QAbstractItemDelegate * itemDelegate() const
Returns the item delegate used by this view and model.
void _q_emitHighlighted(const QModelIndex &)
void setHeight(int h)
Sets the height to the given height.
T * qobject_cast(QObject *object)
void itemSelected(const QModelIndex &)
The QObject class is the base class of all Qt objects.
void adjustComboBoxSize()
InsertPolicy
This enum specifies what the QComboBox should do when a new string is entered by the user...
QAbstractItemDelegate * itemDelegate() const
Returns the item delegate used by the popup list view.
void addWidget(QWidget *, int stretch=0, Qt::Alignment alignment=0)
Adds widget to the end of this box layout, with a stretch factor of stretch and alignment alignment...
void insertSeparator(int index)
Inserts a separator item into the combobox at the given index.
static QObjectPrivate * get(QObject *o)
static bool isSeparator(const QModelIndex &index)
QModelIndex parent() const
Returns the parent of the model index, or QModelIndex() if it has no parent.
QCompleter * completer() const
Returns the current QCompleter that provides completions.
const T value(const Key &key) const
Returns the value associated with the key.
void leaveEvent(QEvent *e)
This event handler can be reimplemented in a subclass to receive widget leave events which are passed...
QSize minimumSizeHint() const
Reimplemented Function
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
QString itemText(int index) const
Returns the text for the given index in the combobox.
const QPoint & pos() const
Returns the position of the mouse cursor, relative to the widget that received the event...
QTimer blockMouseReleaseTimer
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
void clearEditText()
Clears the contents of the line edit used for editing in the combobox.
virtual QSpacerItem * spacerItem()
If this item is a QSpacerItem, it is returned as a QSpacerItem; otherwise 0 is returned.
QVariant itemData(int index, int role=Qt::UserRole) const
Returns the data for the given role in the given index in the combobox, or QVariant::Invalid if there...
void activated(int index)
This signal is sent when the user chooses an item in the combobox.
void setObjectName(const QString &name)
void setValidator(const QValidator *v)
Sets the validator to use instead of the current validator.
void resizeEvent(QResizeEvent *e)
This event handler can be reimplemented in a subclass to receive widget resize events which are passe...
void invalidate()
Resets cached information.
bool editable
whether the combo box can be edited by the user
void setMaxCount(int max)
void setWidth(int w)
Sets the width to the given width.
void setCurrentIndex(const QModelIndex &index, QItemSelectionModel::SelectionFlags command)
Sets the model item index to be the current item, and emits currentChanged().
QVariant inputMethodQuery(Qt::InputMethodQuery) const
Reimplemented Function
T pop()
Removes the top item from the stack and returns it.
QRect boundingRect(QChar) const
Returns the rectangle that is covered by ink if character ch were to be drawn at the origin of the co...
QComboBoxPrivateScroller * top
QStyle::SubControl hoverControl
virtual Qt::ItemFlags flags(const QModelIndex &index) const
Returns the item flags for the given index.
virtual void setModel(QAbstractItemModel *model)
Sets the model for the view to present.
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const =0
Returns the index of the item in the model specified by the given row, column and parent index...
int minimumContentsLength() const
Qt::KeyboardModifiers modifiers() const
Returns the keyboard modifier flags that existed immediately after the event occurred.
QRect popupGeometry(int screen=-1) const
void setCurrentColorGroup(ColorGroup cg)
Set the palette's current color group to cg.
int key() const
Returns the code of the key that was pressed or released.
void updateLayoutDirection()
QComboBoxPrivateContainer * container
void mousePressEvent(QMouseEvent *e)
This event handler, for event event, can be reimplemented in a subclass to receive mouse press events...
int width() const
Returns the width.
Qt::CaseSensitivity caseSensitivity
the case sensitivity of the matching
static QAction * createKeyedAction(StandardSoftKey standardKey, Qt::Key key, QWidget *actionWidget)
Creates a QAction and registers the 'triggered' signal to send the given key event to actionWidget as...
QStyle::StateFlag arrowState
void append(const T &t)
Inserts value at the end of the list.
void changeEvent(QEvent *e)
This event handler can be reimplemented to handle state changes.
QComboBox(QWidget *parent=0)
Constructs a combobox with the given parent, using the default model QStandardItemModel.
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QValidator class provides validation of input text.
void setBrush(ColorRole cr, const QBrush &brush)
Sets the brush for the given color role to the specified brush for all groups in the palette...
void updateLineEditGeometry()
void destroyed(QObject *=0)
This signal is emitted immediately before the object obj is destroyed, and can not be blocked...
The QEventLoop class provides a means of entering and leaving an event loop.
void emitActivated(const QModelIndex &)
Qt::CaseSensitivity autoCompletionCaseSensitivity() const
void contextMenuEvent(QContextMenuEvent *e)
Reimplemented Function
void updateDelegate(bool force=false)
void _q_dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
bool canConvert(Type t) const
Returns true if the variant's type can be cast to the requested type, t.
void setEditable(bool editable)
void clear()
Removes all the elements from the vector and releases the memory used by the vector.
The QSpacerItem class provides blank space in a layout.
void qScrollEffect(QWidget *w, QEffects::DirFlags orient, int time)
Scroll widget w in time ms.
The QStyleOption class stores the parameters used by QStyle functions.
void insertWidget(int index, QWidget *widget, int stretch=0, Qt::Alignment alignment=0)
Inserts widget at position index, with stretch factor stretch and alignment alignment.
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
int count() const
Reimplemented Function
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
QItemSelectionModel * selectionModel() const
Returns the current selection model.
void insertItem(int index, const QString &text, const QVariant &userData=QVariant())
Inserts the text and userData (stored in the Qt::UserRole) into the combobox at the given index...
virtual void scrollTo(const QModelIndex &index, ScrollHint hint=EnsureVisible)=0
Scrolls the view if necessary to ensure that the item at index is visible.
void setAutoCompletionCaseSensitivity(Qt::CaseSensitivity sensitivity)
Use setCompleter() and QCompleter::setCaseSensitivity() instead.
QComboBoxPrivateScroller * bottom
The QTreeView class provides a default model/view implementation of a tree view.
QString text
the line edit's text
void initFrom(const QWidget *w)
int row() const
Returns the row this model index refers to.
void setView(QAbstractItemView *itemView)
Sets the view to be used in the combobox popup to the given itemView.
QSize size() const
Returns the size of the rectangle.
const T & at(int i) const
Returns the item at index position i in the list.
const QAbstractItemModel * model() const
Returns a pointer to the model containing the item that this index refers to.
bool isNull() const
Returns true if the icon is empty; otherwise returns false.
The QHideEvent class provides an event which is sent after a widget is hidden.
The QStringList class provides a list of strings.
int manhattanLength() const
Returns the sum of the absolute values of x() and y(), traditionally known as the "Manhattan length" ...
The QComboBox widget is a combined button and popup list.
void _q_editingFinished()
The QResizeEvent class contains event parameters for resize events.
void hideEvent(QHideEvent *e)
This event handler can be reimplemented in a subclass to receive widget hide events.
const char * styleHint(const QFontDef &request)
QComboBoxPrivateContainer * viewContainer()
void hideEvent(QHideEvent *e)
Reimplemented Function
void setCurrentIndex(const QModelIndex &index)
Sets the current item to be the item at index.
Q_CORE_EXPORT void qWarning(const char *,...)
int delta() const
Returns the distance that the wheel is rotated, in eighths of a degree.
void setCompleter(QCompleter *c)
int timerId() const
Returns the unique timer identifier, which is the same identifier as returned from QObject::startTime...
static void setSeparator(QAbstractItemModel *model, const QModelIndex &index)
bool isActive() const
Returns true if the timer is running (pending); otherwise returns false.
FontHash * qt_app_fonts_hash()
QModelIndex currentIndex() const
Returns the model index of the current item.
void updateArrow(QStyle::StateFlag state)
virtual QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const =0
Returns the data stored under the given role for the item referred to by the index.
void _q_updateIndexBeforeChange()
QAbstractItemModel * model() const
Returns the model used by the combobox.
QStyle::SubControl newHoverControl(const QPoint &pos)
int maxVisibleItems() const
The QShowEvent class provides an event that is sent when a widget is shown.
QComboBox::SizeAdjustPolicy sizeAdjustPolicy
void push(const T &t)
Adds element t to the top of the stack.
Qt::MouseButton button() const
Returns the button that caused the event.
void setModelColumn(int column)
The QTableView class provides a default model/view implementation of a table view.
bool isValid() const
Returns true if this model index is valid; otherwise returns false.
bool contains(const QPoint &p, bool proper=false) const
Returns true if the given point is inside or on the edge of the rectangle, otherwise returns false...
void setLineEdit(QLineEdit *edit)
Sets the line edit to use instead of the current line edit widget.
void setCurrentIndex(const QModelIndex &index)
void editTextChanged(const QString &)
This signal is emitted when the text in the combobox's line edit widget is changed.
void mouseReleaseEvent(QMouseEvent *e)
Reimplemented Function
QIcon itemIcon(const QModelIndex &index) const
virtual bool eventFilter(QObject *, QEvent *)
Filters events if this object has been installed as an event filter for the watched object...
The QAbstractItemModel class provides the abstract interface for item model classes.
Qt::MatchFlags matchFlags() const
Qt::ItemFlags flags() const
Returns the flags for the item referred to by the index.
The QMouseEvent class contains parameters that describe a mouse event.
static QDesktopWidget * desktop()
Returns the desktop widget (also called the root window).
T & first()
Returns a reference to the first item in the list.
void fill(const QColor &fillColor=Qt::white)
Fills the pixmap with the given color.
void timerEvent(QTimerEvent *timerEvent)
This event handler can be reimplemented in a subclass to receive timer events for the object...
void setText(const QString &)
QPersistentModelIndex currentIndex
QPalette palette
the palette that should be used when painting the control
The QBrush class defines the fill pattern of shapes drawn by QPainter.
bool isNull() const
Returns true if this string is null; otherwise returns false.
QPoint center() const
Returns the center point of the rectangle.
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
Disconnects signal in object sender from method in object receiver.
int spacing() const
Returns the spacing between the items in the view.
const QValidator * validator() const
Returns the validator that is used to constrain text input for the combobox.
bool hasSelection() const
Returns true if the selection model contains any selection ranges; otherwise returns false...
The QAbstractItemView class provides the basic functionality for item view classes.
The QStyleHintReturnMask class provides style hints that return a QRegion.
QSize sizeHint() const
This implementation caches the size hint to avoid resizing when the contents change dynamically...
void setAutoCompletion(bool enable)
Use setCompleter() instead.
int top() const
Returns the y-coordinate of the rectangle's top edge.
static bool isEffectEnabled(Qt::UIEffect)
Returns true if effect is enabled; otherwise returns false.
The QItemSelection class manages information about selected items in a model.
The QListView class provides a list or icon view onto a model.
void setDuplicatesEnabled(bool enable)
int right() const
Returns the x-coordinate of the rectangle's right edge.
void setModel(QAbstractItemModel *model)
Sets the model to be model.
The QTimerEvent class contains parameters that describe a timer event.
The QPersistentModelIndex class is used to locate data in a data model.
The QFont class specifies a font used for drawing text.
int y() const
Returns the y-coordinate of the rectangle's top edge.
bool eventFilter(QObject *o, QEvent *e)
Filters events if this object has been installed as an event filter for the watched object...
QString text() const
Returns the Unicode text that this key generated.
QIcon itemIcon(int index) const
Returns the icon for the given index in the combobox.
void mouseReleaseEvent(QMouseEvent *e)
This event handler, for event event, can be reimplemented in a subclass to receive mouse release even...
InsertPolicy insertPolicy() const
virtual void select(const QModelIndex &index, QItemSelectionModel::SelectionFlags command)
Selects the model item index using the specified command, and emits selectionChanged().
void setWidget(QWidget *widget)
Sets the widget for which completion are provided for to widget.
void removeItem(int index)
Removes the item at the given index from the combobox.
void addSpacing(int size)
Adds a non-stretchable space (a QSpacerItem) with size size to the end of this box layout...
virtual void showPopup()
Displays the list of items in the combobox.
Type type() const
Returns the storage type of the value stored in the variant.
iterator insert(const Key &key, const T &value)
Inserts a new item with the key key and a value of value.
QAbstractItemView * view() const
Returns the list view used for the combobox popup.
void setSpacing(int spacing)
Reimplements QLayout::setSpacing().
int x() const
Returns the x-coordinate of the rectangle's left edge.
void setItemIcon(int index, const QIcon &icon)
Sets the icon for the item on the given index in the combobox.
QObject * parent() const
Returns a pointer to the parent object.
int minimumContentsLength
The QPoint class defines a point in the plane using integer precision.
bool singleShot
This static function calls a slot after a given time interval.
QString toLower() const Q_REQUIRED_RESULT
Returns a lowercase copy of the string.
~QComboBox()
Destroys the combobox.
void setFrameStyle(int)
Sets the frame style to style.
Q_DECL_CONSTEXPR const T & qBound(const T &min, const T &val, const T &max)
void installEventFilter(QObject *)
Installs an event filter filterObj on this object.
QHeaderView * header() const
Returns the header for the tree view.
The QModelIndex class is used to locate data in a data model.
QSize decorationSize
the size of the decoration for the item
The QStyle class is an abstract base class that encapsulates the look and feel of a GUI...
bool isEmpty() const
Returns true if the map contains no items; otherwise returns false.
The QStyleOptionComboBox class is used to describe the parameter for drawing a combobox.
void setWidth(int w)
Sets the width of the rectangle to the given width.
void setPen(const QColor &color)
Sets the painter's pen to have style Qt::SolidLine, width 0 and the specified color.
void clear()
Clears the combobox, removing all items.
int height() const
Returns the height.
Qt::LayoutDirection direction
the text layout direction that should be used when drawing text in the control
if(void) toggleToolbarShown
The QRect class defines a rectangle in the plane using integer precision.
bool isValid() const
Returns true if both the width and height is equal to or greater than 0; otherwise returns false...
T qvariant_cast(const QVariant &)
QCompleter * completer() const
Returns the completer that is used to auto complete text input for the combobox.
void _q_rowsInserted(const QModelIndex &parent, int start, int end)
virtual SubControl hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, const QPoint &pt, const QWidget *widget=0) const =0
Returns the sub control at the given position in the given complex control (with the style options sp...
int y() const
Returns the y coordinate of this point.
The QLineEdit widget is a one-line text editor.
The QPixmap class is an off-screen image representation that can be used as a paint device...
void setIconSize(const QSize &size)
void _q_rowsRemoved(const QModelIndex &parent, int start, int end)
The QStylePainter class is a convenience class for drawing QStyle elements inside a widget...
void ignore()
Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false).
void accept()
Sets the accept flag of the event object, the equivalent of calling setAccepted(true).
The QFontMetricsF class provides font metrics information.
The QSize class defines the size of a two-dimensional object using integer point precision.
void resizeEvent(QResizeEvent *e)
Reimplemented Function
void _q_emitCurrentIndexChanged(const QModelIndex &index)
bool isEmpty() const
Returns true if the vector has size 0; otherwise returns false.
void setItemDelegate(QAbstractItemDelegate *delegate)
Sets the item delegate for this view and its model to delegate.
void updateViewContainerPaletteAndOpacity()
QStyleOptionComboBox comboStyleOption() const
int x() const
Returns the x coordinate of this point.
QLineEdit * lineEdit() const
Returns the line edit used to edit items in the combobox, or 0 if there is no line edit...
virtual void hidePopup()
Hides the list of items in the combobox if it is currently visible and resets the internal state...
The QStyleOptionViewItem class is used to describe the parameters used to draw an item in a view widg...
The QStandardItem class provides an item for use with the QStandardItemModel class.
QRegion region
the region for style hints that return a QRegion
void selectAll()
Selects all the text (i.e.
The QInputContext class abstracts the input method dependent data and composing state.
void drawComplexControl(QStyle::ComplexControl cc, const QStyleOptionComplex &opt)
Use the widget's style to draw a complex control cc specified by the QStyleOptionComplex option...
void changeEvent(QEvent *e)
Reimplemented Function
bool duplicatesEnabled() const
void setItemView(QAbstractItemView *itemView)
Sets the item view to be used for the combobox popup.
QPoint initialClickPosition
void insertItems(int index, const QStringList &texts)
Inserts the strings from the list into the combobox as separate items, starting at the index specifie...
bool isValid() const
Returns true if the storage type of this variant is not QVariant::Invalid; otherwise returns false...
The QPaintEvent class contains event parameters for paint events.
QAbstractItemModel * model() const
Returns the model that this view is presenting.
static const KeyPair *const end
QModelIndex rootModelIndex() const
Returns the root model item index for the items in the combobox.
void stop()
Stops the timer.
int computeWidthHint() const
static void setLayoutItemMargins(int left, int top, int right, int bottom, QRect *rect, Qt::LayoutDirection dir)
The QEvent class is the base class of all event classes.
Type type() const
Returns the event type.
The QFrame class is the base class of widgets that can have a frame.
void setEditText(const QString &text)
Sets the text in the combobox's text edit.
const QPoint & globalPos() const
Returns the global position of the mouse cursor at the time of the event.
void setX(int x)
Sets the x coordinate of this point to the given x coordinate.
static int doubleClickInterval()
virtual void setData(const QVariant &value, int role=Qt::UserRole+1)
Sets the item's data for the given role to the specified value.
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
bool showGrid
whether the grid is shown
StateFlag
This enum describes flags that are used when drawing primitive elements.
void setMaxVisibleItems(int maxItems)
void changeSize(int w, int h, QSizePolicy::Policy hData=QSizePolicy::Minimum, QSizePolicy::Policy vData=QSizePolicy::Minimum)
Changes this spacer item to have preferred width w, preferred height h, horizontal size policy hPolic...
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
QRect rect
the area that should be used for various calculations and painting
void updateTopBottomMargin()
QComboBoxPrivateContainer(QAbstractItemView *itemView, QComboBox *parent)
int exec(ProcessEventsFlags flags=AllEvents)
Enters the main event loop and waits until exit() is called.
QStyle::SubControls subControls
This variable holds a bitwise OR of the sub-controls to be drawn for the complex control.
void insertRows(int row, const QList< QStandardItem *> &items)
Inserts items at row.
The QFocusEvent class contains event parameters for widget focus events.
void start(int msec, QObject *obj)
Starts (or restarts) the timer with a msec milliseconds timeout.
The QMap class is a template class that provides a skip-list-based dictionary.
void setRootModelIndex(const QModelIndex &index)
Sets the root model item index for the items in the combobox.
static bool isNull(const QVariant::Private *d)
int & rwidth()
Returns a reference to the width.
int column() const
Returns the column this model index refers to.
void wheelEvent(QWheelEvent *e)
Reimplemented Function
virtual QModelIndex indexAt(const QPoint &point) const =0
Returns the model index of the item at the viewport coordinates point.
QPalette resolve(const QPalette &) const
Returns a new QPalette that has attributes copied from other.
virtual void keyboardSearch(const QString &search)
Moves to and selects the item best matching the string search.
void macWindowFade(void *window, float durationSeconds)
int spacing
the space around the items in the layout
QBasicTimer adjustSizeTimer
The QPalette class contains color groups for each widget state.
The QIcon class provides scalable icons in different modes and states.