Skip to content
Snippets Groups Projects
Commit e303aae0 authored by inso's avatar inso
Browse files

Better placement of context menus

parent 2851920f
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@ Created on 2 févr. 2014
import logging
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QIcon
from PyQt5.QtGui import QIcon, QCursor
from PyQt5.QtWidgets import QWidget, QMessageBox, QAction, QMenu, QDialog, \
QAbstractItemView
from ..models.members import MembersFilterProxyModel, MembersTableModel
......@@ -86,7 +86,7 @@ class CommunityTabWidget(QWidget, Ui_CommunityTabWidget):
menu.addAction(view_wot)
# Show the context menu.
menu.exec_(self.table_community_members.mapToGlobal(point))
menu.exec_(QCursor.pos())
def add_member_as_contact(self):
person = self.sender().data()
......
......@@ -13,7 +13,7 @@ from PyQt5.QtWidgets import QWidget, QMenu, QAction, QApplication, \
QMessageBox, QDialog, QAbstractItemView, QHeaderView
from PyQt5.QtCore import QModelIndex, Qt, pyqtSlot, QObject, \
QThread, pyqtSignal, QDateTime
from PyQt5.QtGui import QIcon
from PyQt5.QtGui import QIcon, QCursor
from ..gen_resources.currency_tab_uic import Ui_CurrencyTabWidget
from .community_tab import CommunityTabWidget
from .transfer import TransferMoneyDialog
......@@ -228,7 +228,7 @@ class CurrencyTabWidget(QWidget, Ui_CurrencyTabWidget):
menu.addAction(rename)
menu.addAction(copy_pubkey)
# Show the context menu.
menu.exec_(self.list_wallets.mapToGlobal(point))
menu.exec_(QCursor.pos())
def history_context_menu(self, point):
index = self.table_history.indexAt(point)
......@@ -262,7 +262,7 @@ class CurrencyTabWidget(QWidget, Ui_CurrencyTabWidget):
copy_pubkey.setData(person)
menu.addAction(copy_pubkey)
# Show the context menu.
menu.exec_(self.table_history.mapToGlobal(point))
menu.exec_(QCursor.pos())
def rename_wallet(self):
index = self.sender().data()
......
......@@ -2,7 +2,7 @@
import math
from PyQt5.QtGui import QPainter, QBrush, QPen, QPolygonF, QColor, QRadialGradient,\
QPainterPath, QMouseEvent, QWheelEvent, QTransform
QPainterPath, QMouseEvent, QWheelEvent, QTransform, QCursor
from PyQt5.QtCore import Qt, QRectF, QLineF, QPoint, QPointF, QSizeF, qFuzzyCompare, pyqtSignal
from PyQt5.QtWidgets import QGraphicsView, QGraphicsScene, QGraphicsEllipseItem,\
QGraphicsSimpleTextItem, QGraphicsLineItem, QMenu, QAction, QGraphicsSceneHoverEvent,\
......
......@@ -4,7 +4,6 @@ import time
import datetime
import logging
from PyQt5.QtWidgets import QWidget, QComboBox, QDialog
from ..gen_resources.wot_tab_uic import Ui_WotTabWidget
from cutecoin.gui.views.wot import NODE_STATUS_HIGHLIGHTED, NODE_STATUS_SELECTED, NODE_STATUS_OUT, ARC_STATUS_STRONG, ARC_STATUS_WEAK
from ucoinpy.api import bma
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment