Ubuntu12.04.4_lts
2023-08-01 961efe36f62f7eba688d504ec0cdf3e1daa4dd74
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
#include "custom_lineedit.h"
 
Custom_LineEdit::Custom_LineEdit(QWidget *parent):
    QLineEdit(parent)
{
    this->setReadOnly(true);
}
 
void Custom_LineEdit::mousePressEvent(QMouseEvent *event)
{
    if(event->button() == Qt::LeftButton)
    {
        emit custom_click();
    }
    QLineEdit::mousePressEvent(event);
}
void Custom_LineEdit::mouseMoveEvent(QMouseEvent *event)
{
    (void)event;
    return;
}
void Custom_LineEdit::mouseDoubleClickEvent(QMouseEvent *event)
{
    (void)event;
    return;
}