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. Get focus on current widget with Qt buttons
Forum Updated to NodeBB v4.3 + New Features

Get focus on current widget with Qt buttons

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 469 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.
  • Q Offline
    Q Offline
    QtVik
    wrote on last edited by
    #1

    I have two dock widgets say A and B.

    widget A is a QGLWidget and widget B is QWidget.

    I have few buttons in widget B.

    When I click on buttons from widget B the focus is still on widget A or Widget A is active.

    How to get the focus on widget B when the button is clicked ?

    Q 1 Reply Last reply
    0
    • Q QtVik

      I have two dock widgets say A and B.

      widget A is a QGLWidget and widget B is QWidget.

      I have few buttons in widget B.

      When I click on buttons from widget B the focus is still on widget A or Widget A is active.

      How to get the focus on widget B when the button is clicked ?

      Q Offline
      Q Offline
      QtVik
      wrote on last edited by
      #2

      @QtVik this->setFocus() worked.

      1 Reply Last reply
      1

      • Login

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