<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 19, 2015 at 10:07 AM, Lubomir I. Ivanov <span dir="ltr"><<a href="mailto:neolit123@gmail.com" target="_blank">neolit123@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 19 March 2015 at 01:28, Lutz Vieweg <<a href="mailto:lvml@5t9.de">lvml@5t9.de</a>> wrote:<br>
> Hi,<br>
><br>
> I would like to print more dives per page in "table" mode,<br>
> just reducing the number sr=4 in<br>
>><br>
>>         const int sr = 12; // smallest row height in pixels<br>
>>         profilePrintRowHeights.append(sr);<br>
><br>
<br>
</span>that's for the table in profile print.<br>
<span class=""><br>
> does not help, even if also reducing the model.setFontsize().<br>
><br>
> Is there some easy way to tell subsurface to not put that much<br>
> margin above/below the table row texts?<br>
><br>
<br>
</span>that's a good question and i quickly experimented with some code to<br>
try to answer it.<br>
nothing works for me: CSS, Qt::SizeHintRole, explicit row heights, etc.<br>
thus, i don't have an answer ATM, so please wait for the print layout<br>
rework which is coming in the next few months.<br>
<br>
in the meantime if someone has a better idea why QTableView is so<br>
stubborn, you can give this a try.<br></blockquote><div><br></div><div>you need to create a new QStyledItemDelegate with a different width and pass it to QTableView<br></div><div>it's not hard to do, there are lots of different delegates written for subsurface.<br></div><div>the easier to change is the StarDelegate - just remove the paint method and add the sizeHint methods.<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
lubomir<br>
--<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
subsurface mailing list<br>
<a href="mailto:subsurface@subsurface-divelog.org">subsurface@subsurface-divelog.org</a><br>
<a href="http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface" target="_blank">http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface</a><br>
</div></div></blockquote></div><br></div></div>