I have two QSliders placed in GridLayout like this:
layout = new GridLayout();
layout->addWidget(slider_horizontal, 0, 1, 1, 2);
layout->addWidget(slider_vertical, 1, 0, 2, 1);
This forms a 2×2 matrix since they are both placed in a different row and column.
What i want is to remove the unused cell in the bottomright corner (position: 1,1).
The thing is that this cell is taking place in my QGraphicsView and making the area not selectable.
Later I make this:
sliderWidget = new QWidget(graphicsView);
sliderWidget = setLayout(layout);
Where graphicsView is the QGraphicsView.
My first thought was that this wasn’t possible, and I had to work me around this problem.
But I want to check if this is possible with you.
I would also like to know if there is some other way to make the unused cell not taking up place in my graphics view.
What about placing the whole Graphics View inside that bottom right cell? This sliders would be outside the graphics view but usually this shouldn’t be a problem.
Not sure if you actually only want scrollbars for a view which displays a small part of a larger scene, in that case you could use these: