Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. LineEdit how to add an onfocus function?

LineEdit how to add an onfocus function?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 319 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    deleted496
    wrote on last edited by
    #1

    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 .

    1. 0_1549294846748_1.PNG
      2.0_1549294883003_2.PNG
      3.0_1549294902055_3.PNG
    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      You have to promote your widget in the designer: http://doc.qt.io/qt-5/designer-using-custom-widgets.html

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      3

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved