Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Get clicked qtwidget object...
Qt 6.12 LTS is out! See what's new in the release blog

Get clicked qtwidget object...

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 548 Views
  • 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.
  • U Offline
    U Offline
    U7Development
    wrote on last edited by U7Development
    #1

    Hi!

    how can i get the clicked qtwidget from my runtime application?

    Ej:
    I have 3 QLabels on my form, when i click on the QLabel 2, and then press W,A,S,D keys i can move it..... if i click QLabel 1, and then press W, A, S,D keys then it moves QLabel 1.... and so... I know how to move widgets, what i want is to get the pointer of the selected widget so in my code i can manipulate it with QKeyEvents to move.. tipically is select and move..

    thanks

    jsulmJ 1 Reply Last reply
    0
    • U U7Development

      Hi!

      how can i get the clicked qtwidget from my runtime application?

      Ej:
      I have 3 QLabels on my form, when i click on the QLabel 2, and then press W,A,S,D keys i can move it..... if i click QLabel 1, and then press W, A, S,D keys then it moves QLabel 1.... and so... I know how to move widgets, what i want is to get the pointer of the selected widget so in my code i can manipulate it with QKeyEvents to move.. tipically is select and move..

      thanks

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @U7Development Use https://doc.qt.io/qt-5/qwidget.html#childAt if you have cursor coordinates.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      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
      • Unsolved