0

I am looking to create a warehouse shelf interface on which the user can click on individual storage places. The shelf layout is a QLabel with a pixmap inside a scrollarea. Since I have multiple shelves, that scrollarea is inside a stacked widget. My issue is that the QLabel with the image is too big to fit on the screen (that's intentional) and therefore needs to be scrolled to the right or left to view the right storage places. In order to click on storage places I placed QToolButtons on top of the image. Therefore I can't use a layout inside the scrollarea ant it won't scroll.

So far I designed this in the Designer and converting it using pyuic5 before loading it into the main application.

The basic question is: How can I use a scrollarea without a layout?

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
timH
  • 3
  • 2
  • I'm voting to reopen as, while it might seem that the OP is asking multiple questions, the duplicate doesn't correctly fit the matter at hand. – musicamante Feb 24 '21 at 02:09
  • @musicamante If the OP has multiple questions then the OP must create multiple posts. Having several questions does not imply its reopening. The question is generic and the other answer shows the generic case of how to display a widget within a QScrollArea without the use of a layout. – eyllanesc Feb 24 '21 at 02:14
  • @eyllanesc I agree, but I believe that the *actual* question is just one: having a stacked widget with a fixed layout of objects superimposed over an image. – musicamante Feb 24 '21 at 02:15
  • @musicamante The QStackedWidget has nothing to do with the scrollbar appearing if it has been implemented correctly, if it has not been implemented correctly then the OP must provide a [mre]. Since the OP does not provide any MRE then I use the generic question which is how to display a widget inside a QScrollArea without layouts. If the error is caused by the QStackedWidget (which so far there is no proof of it) then I will reopen the post unless there is another duplicate. My recommendation is that you advise the OP to clarify his post by adding clear information and an MRE. – eyllanesc Feb 24 '21 at 02:20

0 Answers0