Åke Kullenberg wrote:
> In the attached script:
> 
> * If I hit TAB a dialog will show, so far so good.
> 
> * If I instantiate the SearchDialog with (self) instead of () on line 28,
> the dialog suddenly won't when I hit TAB.
> 
> How can this be fixed, what am I doing wrong? I would of course expect the
> dialog to show in both examples.

mockup.py:

> class SearchDialog(QDialog):
>     def __init__(self, parent=None):
>         QDialog.__init__(self, parent)
>         self.setWindowFlags(Qt.FramelessWindowHint)

Hi,
You clear windowFlags here, thus this dialog becomes a Widget.
(Qt.Widget == 0x00000000 and Qt.Dialog == 0x00000003)
Maybe you want `Qt.FramelessWindowHint | self.windowFlags()`.

And SearchDialog(self) makes SearchDialog widget is a part
of self. Try comment out the following lines to see what happend:

>             global_p = self.mapToGlobal(QPoint(0,0))
>             r = self.rect()
>             global_p.setY(global_p.y())
>             global_p.setX(global_p.x())
>             sd.setFixedWidth(r.width())
>             sd.move(global_p)

Regards,
Yuya
_______________________________________________
PySide mailing list
[email protected]
http://lists.pyside.org/listinfo/pyside

Reply via email to