how to set viewport height and width in css code example
Example 1: set element equal to the size of the viewport
.container {
height: 100vh;
overflow: auto;
}
Example 2: qgraphicsscene get viewport width
graphicsView->mapToScene(graphicsView->viewport()->geometry()).boundingRect()