[PyQt] Custom QWidget FramelessWindowHint consumption ?

Estrada Matthieu m.estrada at alpi.fr
Mon Feb 20 13:08:25 GMT 2017


Ok,

Thanks for answer. My target OS are Windows and Linux (and maybe one day 
MacOS).

It's the first time I develop an application in fact 
(https://github.com/Alignak-monitoring-contrib/alignak-app), so I want 
to be sure to do things correctly.

I would see how it evolves...

Le 20/02/2017 à 13:20, Hans-Peter Jansen a écrit :
> On Montag, 20. Februar 2017 09:18:10 Estrada Matthieu wrote:
>> Hello,
>>
>> I am developing an application in which I want to customize my windows
>> (borders, titles and buttons).
>>
>> For the moment the only way I have found is to apply
>> "Qt.FramelessWindowsHint" flag, then add custom buttons to min, max,
>> close my window and add my own border with css.
>>
>> I want to know if this is the best practice to do that and the least
>> resource-intensive ?
>>
>> Can I customize this kin of things by another way ?
> To my knowledge, this is the way to go.
>
> Unfortunately, the Qt 4/5 interfaces to the various window managers are
> lacking (in part due to the attempt to unify the differences of the many
> supported OS). Using other advertized window flags result more often than not
> in missing/dissatisfying behavior.
>
> Additionally, the many existing X window manager implementations do contribute
> to the imperfection, because they all interpret
>
> 	https://specifications.freedesktop.org/wm-spec/wm-spec-1.3.html
>
> differently...
>
> Depending on your target OS(es), that you forgot to mention, you might need to
> combine your approach with low level OS and WM dependent code (e.g. for sticky
> windows), that could be realized with e.g. xcffib on X. But be warned, that is
> an "iceberg" can of worms and a testing nightmare...
>
> Cheers,
> Pete
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt

-- 

*Matthieu Estrada***

Service Informatique / Intégration

Tel : +33 1 47 52 36 51

_www.alpi-software.com <http://www.alpi-software.com/>_

YouTube <https://www.youtube.com/ALPICaneco> linkedin 
<https://www.linkedin.com/company/alpi> twitter 
<http://twitter.com/Alpi_Caneco>

_/Mentions légales courriels ALPI/ 
<http://www.alpi.fr/mentions-legales.html#disclaim_email>_

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170220/721ac362/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Image 5
Type: image/png
Size: 483 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170220/721ac362/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Image 4
Type: image/png
Size: 782 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170220/721ac362/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Image 3
Type: image/png
Size: 953 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170220/721ac362/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Image 2
Type: image/png
Size: 1069 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170220/721ac362/attachment-0003.png>


More information about the PyQt mailing list