Changed: Enabled custom context menu signal to open a menu at the mouse position.
--HG-- branch : branch-features-geqt-plugin
This commit is contained in:
parent
f7ffb4b865
commit
c5cafc7acc
2 changed files with 96 additions and 92 deletions
|
@ -74,6 +74,10 @@ namespace GeorgesQt
|
||||||
|
|
||||||
m_form = 0;
|
m_form = 0;
|
||||||
|
|
||||||
|
m_ui.treeView->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||||
|
|
||||||
|
connect(m_ui.treeView, SIGNAL(customContextMenuRequested(const QPoint&)),
|
||||||
|
this, SLOT(showContextMenu(const QPoint&)));
|
||||||
connect(m_ui.treeView, SIGNAL(doubleClicked (QModelIndex)),
|
connect(m_ui.treeView, SIGNAL(doubleClicked (QModelIndex)),
|
||||||
this, SLOT(doubleClicked (QModelIndex)));
|
this, SLOT(doubleClicked (QModelIndex)));
|
||||||
connect(m_header, SIGNAL(headerClicked(int)),
|
connect(m_header, SIGNAL(headerClicked(int)),
|
||||||
|
@ -522,7 +526,7 @@ namespace GeorgesQt
|
||||||
// else if(item->getFormElm()->isAtom() && item->valueFrom() == NLGEORGES::UFormElm::ValueForm)
|
// else if(item->getFormElm()->isAtom() && item->valueFrom() == NLGEORGES::UFormElm::ValueForm)
|
||||||
// contextMenu.addAction("Revert to parent/default...");
|
// contextMenu.addAction("Revert to parent/default...");
|
||||||
|
|
||||||
// QAction *selectedItem = contextMenu.exec(globalPos);
|
QAction *selectedItem = contextMenu.exec(QCursor::pos());
|
||||||
// if(selectedItem)
|
// if(selectedItem)
|
||||||
// {
|
// {
|
||||||
// if(selectedItem->text() == "Add parent...")
|
// if(selectedItem->text() == "Add parent...")
|
||||||
|
|
Loading…
Reference in a new issue