Author Topic: How are floating Qt windows created in PixInsight?  (Read 1750 times)

Offline RBA

  • PixInsight Guru
  • ****
  • Posts: 511
    • DeepSkyColors
How are floating Qt windows created in PixInsight?
« on: 2018 October 18 17:25:29 »
OBS (https://obsproject.com/) is a software that can capture/stream your display. When using their current version (I haven't used earlier versions btw), OBS does NOT capture the floating windows created by PixInsight (this is when instructing OBS to capture the whole display, not just a window). OBS does capture everything else: PixInsight's workspace, menus, docked windows, even the tooltips when hovering over an object that has a tooltip in a floating window! Just not the actual floating window.

I've left a question on the OBS forum, as this is clearly their bug, but I am also curious as to how those windows are created in PixInsight, since it might help them figure it out. Thanks!

PS: I tried disabling all GUI effects in case it was related, but that didn't help.

Thanks,
Rogelio

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: How are floating Qt windows created in PixInsight?
« Reply #1 on: 2018 November 02 09:47:38 »
Hi Rogelio,

Sorry for the late answer, but I am extremely busy working on the next version 1.8.6 of PixInsight, which is a complex release with many new features.

By floating windows I assume you mean top-level windows, that is, independent controls that are not child windows of PixInsight's main window, such as all process interfaces in PixInsight. In current versions of PixInsight (since 1.8.4), top-level windows are always native controls on all supported platforms. In Qt terms, this means that QWidget::winId() always returns a nonzero integer when invoked for these objects. For top-level windows QWidget is used merely as an abstract interface between the PixInsight core application and the underlying native windowing system. This allows us to implement graphical effects with hardware acceleration, such as translucency and animations, which would be too slow or even impossible with non-native controls.

To capture top-level windows properly in front of PixInsight's main window, the software used should capture the entire desktop, not just PixInsight. This is because top-level windows are actually independent controls that don't depend on other controls. I hope this information helps somewhat. OBS looks great by the way.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline RBA

  • PixInsight Guru
  • ****
  • Posts: 511
    • DeepSkyColors
Re: How are floating Qt windows created in PixInsight?
« Reply #2 on: 2018 November 02 09:59:14 »
Thank you Juan. Glad to hear about the upcoming release of PixInsight!

I will pass the information to the OBS developers. The bug happens when capturing the whole desktop, and yes, it only happens with the top-level windows. The fact tooltips from those windows are captured but the windows aren't looks really weird in the capture screen!

Thanks again.