title: Managing layouts in Qt with "empty" widgets for displaying images
body: <p>I am designing a GUI in Qt that has placeholders for a number of images (images will be set and updated at run time) along with some input fields (QLineEdits with QLabels grouped into QGroupBoxes). I am using a technique similar to the answer here:</p>
  
  <p><a href="https://stackoverflow.com/questions/14107144/how-do-i-make-an-image-resize-to-scale-in-qt">How do I make an image resize to scale in Qt?</a></p>
  
  <p>for the image display widgets. Some are a class that inherits from QWidget that can draw an aspect-scaled image, others are a class that inherits from QLabel that can do the same and also display text. These are custom C++ classes.</p>
  
  <p>The problem I am having is with the layout and getting things spaced correctly. I am using Qt Designer to layout the GUI. Since the image widgets are "empty" they don't exert a lot of "force" on the other widgets and the other widgets tend to dominate even though I don't need the other widgets to be that big. The QLineEdits especially like to be as wide as they can be. I want to GUI to be adaptable for different sizes (to accommodate different screen resolutions) so I don't really want to set a lot of sizes manually if I can help it.</p>
  
  <p>I do not have a lot of experience in Qt and managing layouts. What I know I have mostly learned from playing around with it. I have tried searching for similar situations without much success. I can't figure out the terms to use for my specific situation. Does anyone have any suggestions for what I can do to better control the layout? Alternatively, are there any good resources for learning how to manage Qt's layouts? The Qt documentation I have looked at is fairly basic. There are a lot of options, most of which I am unsure exactly how they should work, and the trial-and-error approach is getting to be too cumbersome for more complex layouts.</p>
  
  <p>I am using Qt 4.8.</p>
  
  <p>Sorry to be vague. This is a work project and I would rather not post exactly what I have. And coming up with a generic example will take time. I think my questions are generic enough that it shouldn't matter. If a more specific example is needed, I can try to throw something together.</p>
  
  <p>Edit:<br />
  Here is what the layout looks like in Designer right now. The black boxes are redacted labels. The orange boxes are where images will go. The one in the top-left corner is a particular problem. I currently have the top and bottom halves on the left in a splitter in an effort to make things fit better. I think that may be making it worse.<br />
  <a href="https://i.stack.imgur.com/nRRg3.png" rel="nofollow noreferrer">http://i.stack.imgur.com/nRRg3.png</a> (long-time reader, first-time poster :-/)</p>
  
  <p>Making the "What I want it to look like" picture is going to take a bit longer. It may be easy to see what I don't like. The input fields need to be much smaller to make room for the images.</p>
  
  <p>Edit2:<br />
  And here's something closer to what I would like. The upper-left and right-hand images are larger and actually visible. I might like the boxes in the lower-middle to be even bigger, but there's only so much room. If I can get the layout right, I'm hoping that will optimize the size of everything for a given window size.<br />
  <a href="https://i.stack.imgur.com/yvLvi.png" rel="nofollow noreferrer">http://i.stack.imgur.com/yvLvi.png</a></p>