<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Ok,<br>
<br>
Thanks for answer. My target OS are Windows and Linux (and maybe one
day MacOS). <br>
<br>
It's the first time I develop an application in fact
(<a class="moz-txt-link-freetext" href="https://github.com/Alignak-monitoring-contrib/alignak-app">https://github.com/Alignak-monitoring-contrib/alignak-app</a>), so I
want to be sure to do things correctly.<br>
<br>
I would see how it evolves...<br>
<br>
<div class="moz-cite-prefix">Le 20/02/2017 à 13:20, Hans-Peter
Jansen a écrit :<br>
</div>
<blockquote cite="mid:4404261.iChUpovkU7@xrated" type="cite">
<pre wrap="">On Montag, 20. Februar 2017 09:18:10 Estrada Matthieu wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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 ?
</pre>
</blockquote>
<pre wrap="">
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
<a class="moz-txt-link-freetext" href="https://specifications.freedesktop.org/wm-spec/wm-spec-1.3.html">https://specifications.freedesktop.org/wm-spec/wm-spec-1.3.html</a>
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 <a class="moz-txt-link-abbreviated" href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a>
<a class="moz-txt-link-freetext" href="https://www.riverbankcomputing.com/mailman/listinfo/pyqt">https://www.riverbankcomputing.com/mailman/listinfo/pyqt</a></pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<font color="#0d0d0d"><img src="data:" width="680" align="bottom"
height="1"> </font>
<p class="western" style="margin-bottom: 0cm; line-height: 100%"><font
color="#333333"><b>Matthieu Estrada</b></font><font
color="#0d0d0d"><b> </b></font> </p>
<p class="western" style="margin-bottom: 0cm; line-height: 100%"><font
color="#333333">Service Informatique / Intégration</font></p>
<p class="western" style="margin-bottom: 0cm; line-height: 100%"><font
color="#333333">Tel : <font color="#7f7f7f"><font
face="Arial, sans-serif"><font style="font-size: 10pt"
size="2">+33 1 47 52 36 51</font></font></font></font></p>
<p class="western" style="margin-top: 0.21cm; margin-bottom: 0cm;
line-height: 100%"> <font color="#0d0d0d"><img
src="cid:part2.90E56449.C69BEB38@alpi.fr" name="Image 5"
width="129" border="0" align="bottom" height="15"> </font></p>
<p class="western" style="margin-bottom: 0cm; line-height: 100%"><font
color="#0d0d0d"> </font><font color="#0000ff"><u><a
class="western" href="http://www.alpi-software.com/"><font
style="font-size: 10pt" size="2">www.alpi-software.com</font></a></u></font></p>
<p class="western" style="margin-top: 0.21cm; margin-bottom: 0cm;
line-height: 100%"> <font color="#0d0d0d"><a
href="https://www.youtube.com/ALPICaneco"> <img
alt="YouTube" src="cid:part4.9A7F9947.1BFDDA3B@alpi.fr"
name="Image 4" width="24" border="2" height="24"> </a> </font><font
color="#0d0d0d"> </font><font color="#0d0d0d"> <a
href="https://www.linkedin.com/company/alpi"> <img
alt="linkedin" src="cid:part6.346D1212.05C3DBEB@alpi.fr"
name="Image 3" width="24" border="2" height="24"> </a> </font><font
color="#0d0d0d"> </font><font color="#0d0d0d"> <a
href="http://twitter.com/Alpi_Caneco"> <img alt="twitter"
src="cid:part8.0EF43BBF.0FFEDB80@alpi.fr" name="Image 2"
width="24" border="2" height="24"> </a> </font></p>
<p class="western" style="margin-top: 0.21cm; margin-bottom: 0cm;
line-height: 100%"> </p>
<p class="western" style="margin-bottom: 0cm; line-height: 100%"><font
color="#0000ff"><u><a class="western"
href="http://www.alpi.fr/mentions-legales.html#disclaim_email"><font
color="#a1a1a1"><font style="font-size: 10pt" size="2"><i>Mentions
légales courriels ALPI</i></font></font></a></u></font></p>
<title></title>
<meta name="generator" content="LibreOffice 5.1.3.2 (Linux)">
<style type="text/css">
@page { margin: 2cm }
p { margin-bottom: 0.25cm; direction: ltr; color: #000000; line-height: 120%; orphans: 2; widows: 2 }
p.western { font-family: "Calibri", sans-serif; font-size: 11pt; so-language: fr-FR }
p.cjk { font-family: "Calibri", sans-serif; font-size: 11pt }
p.ctl { font-family: "Times New Roman", serif; font-size: 11pt; so-language: ar-SA }
a:visited { color: #800080 }
a.western:visited { so-language: fr-FR }
a.cjk:visited { so-language: zh-CN }
a.ctl:visited { so-language: hi-IN }
a:link { color: #0000ff }
</style> </div>
</body>
</html>