Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
LineEdit how to add an onfocus function?
Dawid Kruczek last edited by
Hello! I'm new in Qt and i want to add an onfocus function to LineEdit, i read an article about focusInEvent function and I've changed this function (1 and 2 pic). In Qt Creator i created a form (3) but i don't know how i can use my new class with focusInEvent function which inherits from QLineEdit .
You have to promote your widget in the designer: http://doc.qt.io/qt-5/designer-using-custom-widgets.html