[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] QWidget.windowHandle()
From:       "Philipp A." <flying-sheep () web ! de>
Date:       2013-11-20 13:34:22
Message-ID: CAN8d9gnwxomP7__QqMVW-WiZS2m1bgc7Ea+YH92ZiCFz-i_FeQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


QWindows aren't parents of anything:

from PyQt5.QtWidgets import QWidget
from PyQt5.QtCore import QApplication
app = QApplication([])
w = QWidget()
w.parent()
w.show()
assert(w.parent() == None)

and why not include a preliminary API? it's available in Qt, so people are
able to choose if they want to risk having to change if it changes. we PyQt
users should be able to do the same.


2013/11/20 Filippo Cucchetto <filippocucchetto@gmail.com>

> Maybe you can just iterate up on the parent/child relationship till you
> get to the QWindow...
>
>
> 2013/11/20 Phil Thompson <phil@riverbankcomputing.com>
>
>> On Wed, 20 Nov 2013 00:35:29 +0100, "Philipp A." <flying-sheep@web.de>
>> wrote:
>> > so how am i supposed to get the QWindow of some .show()n widget?
>>
>> I don't know. Try and find out why the function is experimental and
>> when/if it will be finalised.
>>
>> Phil
>>
>> > 2013/11/19 Phil Thompson <phil@riverbankcomputing.com>
>> >
>> >> On Tue, 19 Nov 2013 22:06:09 +0100, "Philipp A." <flying-sheep@web.de>
>> >> wrote:
>> >> > hi, i need that method in order to get a reference to a widget's
>> >> platform
>> >> > window.
>> >> >
>> >> > http://qt-project.org/doc/qt-5.0/qtwidgets/qwidget.html#windowHandle
>> >> >
>> >> > unfortunately, it's not available.
>> >> >
>> >> > is there another way, or can the method be added?
>> >>
>> >> The method is marked as preliminary which is why it is not implemented.
>> >>
>> >> Phil
>> >>
>> _______________________________________________
>> PyQt mailing list    PyQt@riverbankcomputing.com
>> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>>
>
>
>
> --
> Filippo Cucchetto
>

[Attachment #5 (text/html)]

<div dir="ltr"><div>QWindows aren't parents of anything:<br><br>from PyQt5.QtWidgets \
import QWidget<br>from PyQt5.QtCore import QApplication<br>app = \
QApplication([])<br>w = QWidget()<br>w.parent()<br>w.show()<br>assert(w.parent() == \
None)<br> <br></div>and why not include a preliminary API? it's available in Qt, so \
people are able to choose if they want to risk having to change if it changes. we \
PyQt users should be able to do the same.<br></div><div class="gmail_extra"> \
<br><br><div class="gmail_quote">2013/11/20 Filippo Cucchetto <span dir="ltr">&lt;<a \
href="mailto:filippocucchetto@gmail.com" \
target="_blank">filippocucchetto@gmail.com</a>&gt;</span><br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> <div dir="ltr">Maybe you can just iterate up on the \
parent/child relationship till you get to the QWindow...</div><div \
class="gmail_extra"><br><br><div class="gmail_quote">2013/11/20 Phil Thompson <span \
dir="ltr">&lt;<a href="mailto:phil@riverbankcomputing.com" \
target="_blank">phil@riverbankcomputing.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div><div class="h5">On Wed, 20 Nov 2013 00:35:29 +0100, \
&quot;Philipp A.&quot; &lt;<a href="mailto:flying-sheep@web.de" \
target="_blank">flying-sheep@web.de</a>&gt;<br>


wrote:<br>
<div>&gt; so how am i supposed to get the QWindow of some .show()n widget?<br>
<br>
</div>I don&#39;t know. Try and find out why the function is experimental and<br>
when/if it will be finalised.<br>
<span><font color="#888888"><br>
Phil<br>
</font></span><div><br>
&gt; 2013/11/19 Phil Thompson &lt;<a href="mailto:phil@riverbankcomputing.com" \
target="_blank">phil@riverbankcomputing.com</a>&gt;<br> &gt;<br>
&gt;&gt; On Tue, 19 Nov 2013 22:06:09 +0100, &quot;Philipp A.&quot; &lt;<a \
href="mailto:flying-sheep@web.de" target="_blank">flying-sheep@web.de</a>&gt;<br> \
&gt;&gt; wrote:<br> &gt;&gt; &gt; hi, i need that method in order to get a reference \
to a widget's<br> &gt;&gt; platform<br>
&gt;&gt; &gt; window.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; <a href="http://qt-project.org/doc/qt-5.0/qtwidgets/qwidget.html#windowHandle" \
target="_blank">http://qt-project.org/doc/qt-5.0/qtwidgets/qwidget.html#windowHandle</a><br>
 &gt;&gt; &gt;<br>
&gt;&gt; &gt; unfortunately, it's not available.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; is there another way, or can the method be added?<br>
&gt;&gt;<br>
&gt;&gt; The method is marked as preliminary which is why it is not implemented.<br>
&gt;&gt;<br>
&gt;&gt; Phil<br>
&gt;&gt;<br>
</div></div></div><div><div>_______________________________________________<br>
PyQt mailing list      <a href="mailto:PyQt@riverbankcomputing.com" \
target="_blank">PyQt@riverbankcomputing.com</a><br> <a \
href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" \
target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a></div></div></blockquote></div><span \
class="HOEnZb"><font color="#888888"><br><br clear="all"> <div><br></div>-- \
<br>Filippo Cucchetto </font></span></div>
</blockquote></div><br></div>



_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic