I ended up using int yPos = height();
But, I created my own class to paint the lines, subclassed from QGraphicsItem where I pass in the x and y starting position, line length.
// Horizontal line
for (long lIndex = 1; lIndex <=numberOfFromItems(); lIndex++)
{
m_paItem[lIndex ] = new AGridLine(xPos, yPos, horizontalLineLength, yPos);
m_pScene->addItem(m_paItem[lIndex]);
yPos -= padding;
}
// Horizontal line
for (long lIndex = 1; lIndex <=numberOfFromItems(); lIndex++)
{
m_paItem[lIndex ] = new AGridLine(xPos, yPos, horizontalLineLength, yPos);
m_pScene->addItem(m_paItem[lIndex]);
yPos -= padding;
}
To copy to clipboard, switch view to plain text mode
Bookmarks