Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. Is is possible to run a function to check if a pyside window has been created ?

Is is possible to run a function to check if a pyside window has been created ?

Scheduled Pinned Locked Moved Language Bindings
2 Posts 2 Posters 1.3k 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.
  • 3 Offline
    3 Offline
    3d_Artist
    wrote on last edited by
    #1

    I am using pyside to create a window. However, I would like to call a print function once the window launches to say something like "your window has been created". I don't want to run the print function at the same time as I launch the window since I need to verify that the window actually gets created. Any ideas on how I would do that

    1 Reply Last reply
    0
    • B Offline
      B Offline
      bootchk
      wrote on last edited by
      #2

      Subclass QWindow. Reimplement an event handler such as FocusInEvent(event.). In your reimplementation, call the super handler, and also do your print.

      There may be a better event to snoop on. Probably the FocusInEvent() (receive the focus of keyboard events) comes after the window is painted, but I'm just guessing.

      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