<html><head>
<style type="text/css"><!--#x8afb6707645540a blockquote.cite2
{margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right: 0px; border-left: 1px solid rgb(204, 204, 204); margin-top: 3px; padding-top: 0px;}
#x8afb6707645540a
{font-family: "Segoe UI"; font-size: 12pt;}
--></style><style id="css_styles" type="text/css"><!--blockquote.cite { margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc }
blockquote.cite2 {margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc; margin-top: 3px; padding-top: 0px; }
a img { border: 0px; }
li[style='text-align: center;'], li[style='text-align: center; '], li[style='text-align: right;'], li[style='text-align: right; '] {  list-style-position: inside;}
body { font-family: 'Segoe UI'; font-size: 12pt; }
.quote { margin-left: 1em; margin-right: 1em; border-left: 5px #ebebeb solid; padding-left: 0.3em; }
a.em-mention[href] { text-decoration: none; color: inherit; border-radius: 3px; padding-left: 2px; padding-right: 2px; background-color: #e2e2e2; }
._em_placeholder {color: gray; border-bottom: 1px dotted lightblue;} ._em_placeholder:before{color:gray; content: '{{ ';} ._em_placeholder:after{color:gray; content: ' }}';}
--></style>
</head>
<body><div>Oops.  My bad.  Before I posted, I was trying different sizes to the <font face="Consolas">.scaled()</font> call.  I accidentally left it at <font face="Consolas" size="3" style="font-size: 16px;">QSize(24, 24)</font>.  What I really want to do is set it to 64x64.  Attached is the script I meant to post.</div><div><br /></div><div>Sorry.</div><div><br /></div><div>/John</div>
<div><br /></div>
<div x-em-replyforwardheader=""><br /></div>
<div>
<div>------ Original Message ------</div>
<div>From "John Sturtz" <<a href="mailto:john@sturtz.org">john@sturtz.org</a>></div>
<div>To <a href="mailto:pyqt@riverbankcomputing.com">pyqt@riverbankcomputing.com</a></div>
<div>Date 10/19/2025 3:08:28 PM</div>
<div>Subject Scale pixmap image in QHeaderView</div></div><div x-em-quote=""><br /></div>
<div id="x8afb6707645540a"><blockquote cite="emb505fdb0-6852-4f4b-92ca-e57e8711e7ff@46d5f8f0.com" type="cite" class="cite2">
Hello again.<div><br /></div><div>Attached is a short bit of code that displays a <font face="Consolas">QTableView</font> with a custom <font face="Consolas" size="3" style="font-size: 16px;">QHeaderView</font>.  The <font face="Consolas" size="3" style="font-size: 16px;">.headerData()</font> method loads a 64x64 PNG and returns it for <font face="Consolas" size="3" style="font-size: 16px;">DecorationRole</font>.</div><div><br /></div><div>Can anyone tell me why the <font face="Consolas" style="font-size: 16px;" size="3">.scaled()</font> call on line #61 can't make the header image larger?  If I change the argument to <font face="Consolas" size="3" style="font-size: 16px;">.scaled()</font> to <font face="Consolas" size="3" style="font-size: 16px;">QSize(8, 8)</font>, it makes the image small.  So the <font face="Consolas" style="font-size: 16px;" size="3">.scaled()</font> call is evidently having an effect.  But if I specify <font face="Consolas" size="3" style="font-size: 16px;">QSize(64, 64)</font>, it doesn't get anywhere near as large as 64x64.  I've been unable to determine why.</div><div><br /></div><div>Thanks!</div><div><br /></div><div>/John</div></blockquote></div>
</body></html>