308 if (property && item && (item->flags() & Qt::ItemIsEnabled)) { |
308 if (property && item && (item->flags() & Qt::ItemIsEnabled)) { |
309 QWidget *editor = m_editorPrivate->createEditor(property, parent); |
309 QWidget *editor = m_editorPrivate->createEditor(property, parent); |
310 if (editor) { |
310 if (editor) { |
311 editor->setAutoFillBackground(true); |
311 editor->setAutoFillBackground(true); |
312 editor->installEventFilter(const_cast<QtPropertyEditorDelegate *>(this)); |
312 editor->installEventFilter(const_cast<QtPropertyEditorDelegate *>(this)); |
313 connect(editor, SIGNAL(destroyed(QObject *)), this, SLOT(slotEditorDestroyed(QObject *))); |
313 connect(editor, SIGNAL(destroyed(QObject*)), this, SLOT(slotEditorDestroyed(QObject*))); |
314 m_propertyToEditor[property] = editor; |
314 m_propertyToEditor[property] = editor; |
315 m_editorToProperty[editor] = property; |
315 m_editorToProperty[editor] = property; |
316 m_editedItem = item; |
316 m_editedItem = item; |
317 m_editedWidget = editor; |
317 m_editedWidget = editor; |
318 } |
318 } |
450 m_treeWidget->header()->setMovable(false); |
450 m_treeWidget->header()->setMovable(false); |
451 m_treeWidget->header()->setResizeMode(QHeaderView::Stretch); |
451 m_treeWidget->header()->setResizeMode(QHeaderView::Stretch); |
452 |
452 |
453 m_expandIcon = drawIndicatorIcon(q_ptr->palette(), q_ptr->style()); |
453 m_expandIcon = drawIndicatorIcon(q_ptr->palette(), q_ptr->style()); |
454 |
454 |
455 QObject::connect(m_treeWidget, SIGNAL(collapsed(const QModelIndex &)), q_ptr, SLOT(slotCollapsed(const QModelIndex &))); |
455 QObject::connect(m_treeWidget, SIGNAL(collapsed(QModelIndex)), q_ptr, SLOT(slotCollapsed(QModelIndex))); |
456 QObject::connect(m_treeWidget, SIGNAL(expanded(const QModelIndex &)), q_ptr, SLOT(slotExpanded(const QModelIndex &))); |
456 QObject::connect(m_treeWidget, SIGNAL(expanded(QModelIndex)), q_ptr, SLOT(slotExpanded(QModelIndex))); |
457 QObject::connect(m_treeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), q_ptr, SLOT(slotCurrentTreeItemChanged(QTreeWidgetItem*,QTreeWidgetItem*))); |
457 QObject::connect(m_treeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), q_ptr, SLOT(slotCurrentTreeItemChanged(QTreeWidgetItem*,QTreeWidgetItem*))); |
458 } |
458 } |
459 |
459 |
460 QtBrowserItem *QtTreePropertyBrowserPrivate::currentItem() const |
460 QtBrowserItem *QtTreePropertyBrowserPrivate::currentItem() const |
461 { |
461 { |