#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; }