Important: Please read the Qt Code of Conduct -

Windows parenting not working on Kubuntu

  • Hello community,

    Today I was trying to get a windowB stay on top of an other windowA, usually just setting the parent would work (at least on windows it does) but at work we are using this weird Kubuntu that I hate more than anything and it obviously doesn't work ...

    from PyQt4 import QtGui
    winA = QtGui.QMainWindow()
    winB = QtGui.QDialog(parent=winA)

    I've tried the StayOnTopHint but it's not what I want, I only want it to be on top of the direct parent and not everything else.
    I could force the focus of B but it doesn't seem right.

    Is there any other way to get this to work ?

    Thx !

  • Lifetime Qt Champion


    What version of Kubuntu is it ? With which version of Qt and PyQt4 ?

    On a side note, starting a thread by saying how much you hate a Linux distribution using a desktop environment based on Qt might not be the best move on a forum dedicated to Qt.

  • Well, there is nothing wrong about sharing preferences. But it's doesn't matter.
    We are using kubuntu 12.04 and PyQt-4.10.484.4.

    For now, I do windowB.activateWindow() when my mouse enters windowA but it's a bit limited and I don't really like it.

Log in to reply