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

List:       pykde
Subject:    Re: Aligning text on QLabel with Style Sheets in PyQt6
From:       RedHuli <redhuli.comments () gmail ! com>
Date:       2021-10-01 18:05:42
Message-ID: CACDNW2XVnT4xGMPNPmPpm3eesbq1P=VZqQYYfhZohHVt+tFzOQ () mail ! gmail ! com
[Download RAW message or body]

Hello Phil,

Thank you for that clarification about Q_PROPERTY.

After doing a bit of research, I realize now that I had made an incorrect
assumption since I was using qproperty with style sheets.

Joshua Willman

On Fri, Oct 1, 2021 at 10:41 AM Phil Thompson <phil@riverbankcomputing.com>
wrote:

> On 01/10/2021 16:32, RedHuli wrote:
> > Hello,
> >
> > I have a quick question. Back in PyQt5, I could use stylesheets and
> > QObject
> > properties for aligning text, like so:
> > label = QLabel("Test")
> > label.setStyleSheet("qproperty-alignment: AlignCenter")
> >
> > I know I can use label.setAlignment(Qt.AlignmentFlag.AlignCenter) in
> > PyQt6.
> > label.setAlignement(Qt.AlignmentFlag.AlignCenter)
> >
> > What I was more so curious about is if Q_PROPERTY is still available in
> > PyQt6. I haven't seen anything about it being removed. I assume that I
> > can
> > still use it and that something is wrong with my syntax.
>
> PyQt has never supported Q_PROPERTY.
>
> Phil
>

[Attachment #3 (text/html)]

<div dir="ltr">Hello Phil,  <div><br></div><div>Thank  you for that  clarification \
about  Q_PROPERTY.  </div><div><br></div><div>After  doing a bit  of research, I \
realize now that I had made an incorrect assumption since I was using qproperty  with \
style sheets.  </div><div><br></div><div>Joshua Willman</div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 1, 2021 at 10:41 AM \
Phil Thompson &lt;<a href="mailto:phil@riverbankcomputing.com" \
target="_blank">phil@riverbankcomputing.com</a>&gt; wrote:<br></div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">On \
01/10/2021 16:32, RedHuli wrote:<br> &gt; Hello,<br>
&gt; <br>
&gt; I have a quick question. Back in PyQt5, I could use stylesheets and <br>
&gt; QObject<br>
&gt; properties for aligning text, like so:<br>
&gt; label = QLabel(&quot;Test&quot;)<br>
&gt; label.setStyleSheet(&quot;qproperty-alignment: AlignCenter&quot;)<br>
&gt; <br>
&gt; I know I can use label.setAlignment(Qt.AlignmentFlag.AlignCenter) in <br>
&gt; PyQt6.<br>
&gt; label.setAlignement(Qt.AlignmentFlag.AlignCenter)<br>
&gt; <br>
&gt; What I was more so curious about is if Q_PROPERTY is still available in<br>
&gt; PyQt6. I haven&#39;t seen anything about it being removed. I assume that I <br>
&gt; can<br>
&gt; still use it and that something is wrong with my syntax.<br>
<br>
PyQt has never supported Q_PROPERTY.<br>
<br>
Phil<br>
</blockquote></div>



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

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