forked from piotrm35/Add_a_point_road_sign
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMy_QLabel.py
47 lines (35 loc) · 1.42 KB
/
My_QLabel.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# -*- coding: utf-8 -*-
"""
/***************************************************************************
My_QLabel.py
My QLabel QT5 widget with mouseReleaseEvent handled.
--------------------------------------
Date : 21.01.2019
Copyright: (C) 2019 by Piotr Michałowski
Email: [email protected]
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation.
*
***************************************************************************/
"""
SCRIPT_TITLE = 'Add a point road sign'
GENERAL_INFO = u"""
author: Piotr Michałowski, Olsztyn, woj. W-M, Poland
license: GPL v. 2
work begin: 21.01.2019
"""
# this file version: 0.1
from PyQt5 import QtWidgets
#====================================================================================================================
class My_QLabel(QtWidgets.QLabel):
def __init__(self, parent, path):
super(My_QLabel, self).__init__()
self.parent = parent
self.path = path
def mouseReleaseEvent(self, e):
self.parent.set_selected_type_QLabel(self.path)
#====================================================================================================================