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

List:       pykde
Subject:    Re: [PyQt] Some problems with styleSheets in QT4.3.1 and PyQt4.3
From:       "Gustavo_A._Dí­az"
Date:       2007-08-21 17:34:26
Message-ID: 46CB2222.7050404 () gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Claudio,

¿Qué tal?

Puedes chequear el código de mi app aquí:
http://opencoffee.lnxteam.org/trac/browser/trunk/opencoffee-server/MainApp.py

Allí mismo ya está implementado el FIX para QTabWidget. Solo busca más
abajo donde se establecen los estilos para tal.


Saludos.

-- 
/Gustavo A. Díaz/
*GDNet Projects*
www.gdnet.com.ar <http://www.gdnet.com.ar>
Gustavo A. Díaz


Claudio A. Quezada R. escribió:
> Hola Gustavo,
>
> estoy escribiendo un software libre con python y PyQt, vi tu mensaje
> en la lista, y me gustaría consultarte 2 cosas:
>
> 1) ¿Cómo estableces la instancia "QTabWidget QStackedWidget {
> background: url/to/pixmap }" que menciona David? O más bien... ¿cómo
> modificas el background para un QTabWidget (u otro widget)?
>
> 2) ¿Sabes como reimplementar el QApplication::Notify()?, he hecho
> algunas llamadas incorrectas, y me ha aparecido 2 veces este error
> mientras corro el programa, aunque arreglando el código ya no vuelve a
> aparecer dicho error (Qt has caught an exception thrown from an event
> handler...)
>
> Si gustas (y tienes tiempo) te puedo enviar la interfaz gráfica en la
> que trabajo.
>
> Gracias de antemano,
>
> Saludos,
>
> Claudio
>
>
> 2007/8/21, "Gustavo A. Dí­az" < gustavo.diaz@gmail.com
> <mailto:gustavo.diaz@gmail.com>>:
>
>     Ok, nevermind, this fix does not affect QT4.3, so is perfect.
>
>     Thanks Again David!
>
>     Cheers.
>
>     Gustavo A. Dí­az escribió:
>>     David,
>>
>>     Hi!!
>>
>>     That fix worked out for QT4.3.1, i didn't test it yet for
>>     QT4.3... this will be a problem for this one?
>>
>>     Thanks!
>>
>>     Cheers.
>>
>>     David Boddie escribió:
>>>     On Sunday 19 August 2007 23:56, you wrote:
>>>
>>>       
>>>>     So, with QT4.3.1 and pyqt4.3  the tabwidget uses the stackedwidget
>>>>     background pixmap (as i clearly demostrate on the screenshots....)
>>>>
>>>>     This does not happen with qt4.3 nd pyqt4.3
>>>>         
>>>     OK. The problem is that the bug which prevented QStackedWidget from being
>>>     styled correctly was fixed in Qt 4.3.1. Previously, you had to set the
>>>     frame style to make it work.
>>>
>>>     Unfortunately, QTabWidget itself contains an internal QStackedWidget, and
>>>
>>>     that is now styled as well. The trick is to make sure that this internal
>>>     QStackedWidget has its own background. You can turn it off by adding this
>>>     to the style sheet for each QTabWidget instance:
>>>
>>>       QTabWidget QStackedWidget { background: none }
>>>
>>>
>>>     I'm told that future Qt releases will use something like this in the default
>>>     widget style sheet, so this workaround will only be necessary for Qt 4.3.1.
>>>     Still, it shouldn't cause any side effects if it's applied twice.
>>>
>>>
>>>     David
>>>
>>>       
>>
>>
>>     -- 
>>     /Gustavo A. Díaz/
>>     *GDNet Projects*
>>     www.gdnet.com.ar <http://www.gdnet.com.ar>
>>     Gustavo A. Díaz
>
>
>     -- 
>     /Gustavo A. Díaz/
>     *GDNet Projects*
>     www.gdnet.com.ar <http://www.gdnet.com.ar>
>     Gustavo A. Díaz
>
>     _______________________________________________
>     PyQt mailing list    PyQt@riverbankcomputing.com
>     <mailto:PyQt@riverbankcomputing.com>
>     http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
>
>
>
> -- 
> Claudio Quezada Romegialli
> Ingeniero Ambiental
> (02)7321665 - 81466049 




[Attachment #5 (multipart/related)]

[Attachment #7 (text/html)]

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Claudio,<br>
<br>
&iquest;Qu&eacute; tal?<br>
<br>
Puedes chequear el c&oacute;digo de mi app aqu&iacute;:
<a class="moz-txt-link-freetext" \
href="http://opencoffee.lnxteam.org/trac/browser/trunk/opencoffee-server/MainApp.py">h \
ttp://opencoffee.lnxteam.org/trac/browser/trunk/opencoffee-server/MainApp.py</a><br> \
<br> All&iacute; mismo ya est&aacute; implementado el FIX para QTabWidget. Solo busca \
m&aacute;s abajo donde se establecen los estilos para tal.<br>
<br>
<br>
Saludos.<br>
<br>
-- <br>
<em>Gustavo A. D&iacute;az</em><br>
<strong>GDNet Projects</strong><br>
<a href="http://www.gdnet.com.ar">www.gdnet.com.ar</a><br>
<img alt="Gustavo A. D&iacute;az" src="cid:part1.09010406.03020403@gmail.com"><br>
<br>
<br>
Claudio A. Quezada R. escribi&oacute;:
<blockquote
 cite="mid:737bb1390708211019r43805835p4f9292ff06da0069@mail.gmail.com"
 type="cite">Hola Gustavo,<br>
  <br>
estoy escribiendo un software libre con python y PyQt, vi tu mensaje en
la lista, y me gustar&iacute;a consultarte 2 cosas:<br>
  <br>
1) &iquest;C&oacute;mo estableces la instancia "QTabWidget QStackedWidget {
background: url/to/pixmap }" que menciona David? O m&aacute;s bien... \
&iquest;c&oacute;mo modificas el background para un QTabWidget (u otro widget)?
  <br>
  <br>
2) &iquest;Sabes como reimplementar el QApplication::Notify()?, he hecho
algunas llamadas incorrectas, y me ha aparecido 2 veces este error
mientras corro el programa, aunque arreglando el c&oacute;digo ya no vuelve a
aparecer dicho error (Qt has caught an exception thrown from an event
handler...)
  <br>
  <br>
Si gustas (y tienes tiempo) te puedo enviar la interfaz gr&aacute;fica en la
que trabajo.<br>
  <br>
Gracias de antemano,<br>
  <br>
Saludos,<br>
  <br>
Claudio<br>
  <br>
  <br>
  <div><span class="gmail_quote">2007/8/21, "Gustavo A. D&iacute;&shy;az" &lt;
  <a moz-do-not-send="true" \
href="mailto:gustavo.diaz@gmail.com">gustavo.diaz@gmail.com</a>&gt;:</span>  \
<blockquote class="gmail_quote"  style="border-left: 1px solid rgb(204, 204, 204); \
margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">  <div bgcolor="#ffffff" \
text="#000000">Ok, nevermind, this fix does not affect QT4.3, so is perfect.<br>
    <br>
Thanks Again David!<span class="q"><br>
    <br>
Cheers.<br>
    <br>
Gustavo A. D&iacute;&shy;az escribi&oacute;:
    </span>
    <div><span class="e" id="q_11488e82bbcf90c7_2">
    <blockquote type="cite"> David,<br>
      <br>
Hi!!<br>
      <br>
That fix worked out for QT4.3.1, i didn't test it yet for QT4.3... this
will be a problem for this one?<br>
      <br>
Thanks!<br>
      <br>
Cheers.<br>
      <br>
David Boddie escribi&oacute;:
      <blockquote type="cite">
        <pre>On Sunday 19 August 2007 23:56, you wrote:

  </pre>
        <blockquote type="cite">
          <pre>So, with QT4.3.1 and pyqt4.3  the tabwidget uses the stackedwidget
background pixmap (as i clearly demostrate on the screenshots....)

This does not happen with qt4.3 nd pyqt4.3
    </pre>
        </blockquote>
        <pre>OK. The problem is that the bug which prevented QStackedWidget from \
being styled correctly was fixed in Qt 4.3.1. Previously, you had to set the
frame style to make it work.

Unfortunately, QTabWidget itself contains an internal QStackedWidget, and

that is now styled as well. The trick is to make sure that this internal
QStackedWidget has its own background. You can turn it off by adding this
to the style sheet for each QTabWidget instance:

  QTabWidget QStackedWidget { background: none }


I'm told that future Qt releases will use something like this in the default
widget style sheet, so this workaround will only be necessary for Qt 4.3.1.
Still, it shouldn't cause any side effects if it's applied twice.


David

  </pre>
      </blockquote>
      <br>
      <br>
      <div>-- <br>
      <em>Gustavo A. D&iacute;az</em><br>
      <strong>GDNet Projects</strong><br>
      <a moz-do-not-send="true" href="http://www.gdnet.com.ar"
 target="_blank" onclick="return \
top.js.OpenExtLink(window,event,this)">www.gdnet.com.ar</a><br>  <img \
moz-do-not-send="true" alt="Gustavo A. D&iacute;az"> </div>  </blockquote>
    <br>
    <br>
    <div>-- <br>
    <em>Gustavo A. D&iacute;az</em><br>
    <strong>GDNet Projects</strong><br>
    <a moz-do-not-send="true" href="http://www.gdnet.com.ar"
 target="_blank" onclick="return \
top.js.OpenExtLink(window,event,this)">www.gdnet.com.ar</a><br>  <img \
moz-do-not-send="true" alt="Gustavo A. D&iacute;az">  </div>
    </span></div>
    </div>
    <br>
_______________________________________________<br>
PyQt mailing list &nbsp; &nbsp;<a moz-do-not-send="true"
 onclick="return top.js.OpenExtLink(window,event,this)"
 href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br>
    <a moz-do-not-send="true"
 onclick="return top.js.OpenExtLink(window,event,this)"
 href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt"
 target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br>
    <br clear="all">
  </blockquote>
  </div>
  <br>
  <br clear="all">
  <br>
-- <br>
Claudio Quezada Romegialli<br>
Ingeniero Ambiental<br>
(02)7321665 - 81466049
</blockquote>
<br>
<br>
<div class="moz-signature"><br>
</div>
</body>
</html>


["firma-email.jpg" (image/jpeg)]

_______________________________________________
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