Hi
I'm creating a splashscreen for my app, but unfortunately the widget gets parented to the splash screen, which means it has no taskbar icon.
QtGui.QApplication.activeWindow() returns None if there no splashscreen, and that's fine, but with the splashscreen, it returns the splashscreen object.
Is there some way I can trick it into not parenting it to the splash screen?
Im working in the _init_.py that has widget = app.engine.show_dialog("Asset Manager", app, AppDialog, app)
thanks
Phil
import sgtk
from sgtk.platform.qt import QtCore, QtGui
from .ui import resources_rc
def show_dialog(app):
from .asset_manager import AppDialog
splash_pix = QtGui.QPixmap(":/res/splash.png")
splash = QtGui.QSplashScreen(splash_pix)
splash.setMask(splash_pix.mask())
splash.show()
splash.raise_()
#Create and display the splash screen
QtCore.QCoreApplication.processEvents()
print "first parent: ", QtGui.QApplication.activeWindow()
import grab_directories as grab
bIcon = grab.imp.import_module( grab.pathDict['burrows_icon']['production'] )
# show the dialog window using the engine's show_dialog method
widget = app.engine.show_dialog("Asset Manager", app, AppDialog, app)
bIcon.SetTankIcon(widget)
#attach splash screen to the main window to help GC
widget.__splash_screen = splash
# hide splash screen after loader UI show
splash.finish(widget.window())
# bring window to front
widget.raise_()