> Hi, had a similar problem, couldn't find any other solution than using an > event filter, but it turned out being not so bad, made a small class: > > In my MainWindow I have an instance of that class, and in MainWindows's > ctor I initialize it: > > MouseFilter mf; > ... > mf.setWidget(ui->lineEdit); > qApp->installEventFilter(&mf);
Thank you. I was going down this path as well, that I might have to do it as an event filter installed somewhere up the hierarchy, instead of just being able to do it within a custom class that inherits from QLineEdit. So far I haven't found a way to do that. And you're right, it's not so bad to do it via an event filter, but it's just one extra step I have to remember to do, every time I want to re-use this custom line edit, either within this application, or in other applications. Sean This message has been scanned for malware by Forcepoint. www.forcepoint.com _______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest