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. MDI sub window's event handling?
Qt 6.12 LTS is out! See what's new in the release blog

MDI sub window's event handling?

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 2.9k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    I have a widget inherited from QGLWidget which is added to MDI area with addSubWindow().

    I implemented my widget's keyPressEvent(), making it output a line of text every time it is called.
    But it seems not working -- I guess the key press event is captured by QMdiSubWindow, but not sure.

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Well, for you desperate guys who found this page with google...

      Just:

      1. write a class P which inherites QMdiSubWindow;
      2. reimplement QMdiSubWindow::*Event();
      3. use QMdiSubWindow::setWidget(QWidget *);
      4. call QMdiArea::addSubWindow(p). [here p is the instance of your class P]
      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