I'm using a QListWidget that is populated with instances of my own custom menu item widget. The menu item widget consists of a QWidget with a QHBoxLayout, and several QLabels.
I am happy with everything, except that the QHBoxLayout seems to take over the size of my widget, shrinking my widget height so that it fits the labels contained within. I want the menu item widget to be a constant size, and just have the QHBoxLayout arrange its children horizontally, and it's driving me crazy that it takes over the height of the widget!
Does anyone have any ideas? I've tried things in my menu item QWidget like:
this->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
this->resize(10, 30);
in the hopes that the 10 would be ignored (and expanded) and the 30 would stay fixed, but the widget continues to be sized much smaller.
Thanks!
Marlon