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. TextField onReturnPressed slot raises twice
Forum Updated to NodeBB v4.3 + New Features

TextField onReturnPressed slot raises twice

Scheduled Pinned Locked Moved Unsolved General and Desktop
signal&slotreturnpressedtextfield
1 Posts 1 Posters 644 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.
  • A Offline
    A Offline
    ars1614
    wrote on last edited by ars1614
    #1

    Hi! I am working with this qml element and I have it right like this:

    TextField {
        id: whatever
        placeholderText: "<i>" + "SomeText" + "</i>"
        selectByMouse: true
        layer.enabled: true
        width: parent.width
        anchors.verticalCenter: parent.verticalCenter
    
        Keys.onLeftPressed: {
            console.log('TextFooter: Left Event');
            event.accepted = false;
        }
        Keys.onReturnPressed: {
            console.log('TextFooter: Return Event');
            event.accepted = false;
    	}
    }
    

    I am receiving the returnPressed twice.

    Does anyone know why?

    1 Reply Last reply
    0

    • Login

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