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