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

List:       pykde
Subject:    Re: [PyQt] Question of QTableWidget setSpan
From:       Damon Lynch <damonlynch () gmail ! com>
Date:       2017-04-21 16:45:12
Message-ID: CAFdFio9RYSzdyNnJb1=j8pXEyO5=5DC+zA=59ebxBc1nSRyumA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Thu, Apr 20, 2017 at 9:38 PM, 이창호 <changho@hyundai-autron.com> wrote:

> Hi.
>
>
>
> I am making a simple program with PyQt5.
>
>
>
> Why the below results are different?
>
>
>
> I'd like to display 2. Style using QHeaderView.ResizeToContents option.
>
>
>
> Is this a pyqt bug?
>
>
> <https://www.riverbankcomputing.com/mailman/listinfo/pyqt>
>


Hi Changdo,

I very much doubt it's a PyQt bug. What you're seeing is more likely to be
caused by the fact that when you call setSpan, the automatic layout
features of Qt tables works in unexpected ways. In my experience (see left
side of image below) as soon as you use setSpan, expect to have to manually
set individual cell sizes. And that can get complicated pretty quickly.
It's unfortunate, but I'm not aware of any other way to solve the problem.
However, it goes without saying that others might have different ways of
confronting the problem, so it's worth seeking feedback from them too.




Best,
Damon
-- 
http://www.damonlynch.net

[Attachment #5 (text/html)]

<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Apr 20, 2017 \
at 9:38 PM, 이창호 <span dir="ltr">&lt;<a href="mailto:changho@hyundai-autron.com" \
target="_blank">changho@hyundai-autron.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div lang="KO"><div \
class="gmail-m_1032395714206133442WordSection1"><p class="MsoNormal"><span \
lang="EN-US">Hi.<u></u><u></u></span></p><p class="MsoNormal"><span \
lang="EN-US"><u></u>  <u></u></span></p><p class="MsoNormal"><span lang="EN-US">I am \
making a simple program with PyQt5.<u></u><u></u></span></p><p \
class="MsoNormal"><span lang="EN-US"><u></u>  <u></u></span></p><p \
class="MsoNormal"><span lang="EN-US">Why the below results are \
different?<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u>  \
<u></u></span></p><p class="MsoNormal"><span lang="EN-US">I</span>'<span \
lang="EN-US">d like to display 2. Style using QHeaderView.ResizeToContents \
option.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u>  \
<u></u></span></p><p class="MsoNormal"><span lang="EN-US">Is this a pyqt \
bug?<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">  \
</span></p></div></div><a \
href="https://www.riverbankcomputing.com/mailman/listinfo/pyqt" rel="noreferrer" \
target="_blank"></a><br></blockquote></div><br><br>Hi Changdo,<br \
clear="all"><br></div><div class="gmail_extra">I very much doubt it&#39;s a PyQt bug. \
What you&#39;re seeing is more likely to be caused by the fact that when you call \
setSpan, the automatic layout features of Qt tables works in unexpected ways. In my \
experience (see left side of image below) as soon as you use setSpan, expect to have \
to manually set individual cell sizes. And that can get complicated pretty quickly. \
It&#39;s unfortunate, but I&#39;m not aware of any other way to solve the problem. \
However, it goes without saying that others might have different ways of confronting \
the problem, so it&#39;s worth seeking feedback from them too.<br><br><img \
src="http://damonlynch.net/rapid/screenshots/091/timeline.png" width="561" \
height="446"><br><br><br></div><div class="gmail_extra">Best,<br></div><div \
class="gmail_extra">Damon<br></div><div class="gmail_extra">-- <br><div \
class="gmail_signature"><a href="http://www.damonlynch.net" \
target="_blank">http://www.damonlynch.net</a><div></div><div></div><div></div></div> \
</div></div>


[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://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