Auliyaa
12th January 2012, 10:27
Hi everyone,
I'm currently working with the QGraphicsView framework and I'm embedding some widget in a scene where some graph drawing is done.
My embedded widget is meant to be a quick access bar anchored to the bottom of the scene. I added a QGraphicsProxyWidget to my scene and I move it to the bottom of the scene every time the QGraphicsView widget gets resized.
Everything worked perfectly until I decided to add a QComboBox in my bottom bar. When I click on the combo label, the popup always shows up at the bottom of the QComboBox. Except it should be displayed on top of the combo box since my widget is located at the very bottom of my application. Here's a screenshot of what happens:
7259
Note: The red square shows the actual area on which the popup is expanded.
So my question is: Is there a way to force the QComboBox's popup position either by subclassing QComboBox or with some stylesheet configuration ?
I checked the QComboBox::showPopup() method already but reimplementing it would mean re-writing all the code concerning the actual creation of the popup widget and I'd rather avoid that.
Any suggestion ?
I'm currently working with the QGraphicsView framework and I'm embedding some widget in a scene where some graph drawing is done.
My embedded widget is meant to be a quick access bar anchored to the bottom of the scene. I added a QGraphicsProxyWidget to my scene and I move it to the bottom of the scene every time the QGraphicsView widget gets resized.
Everything worked perfectly until I decided to add a QComboBox in my bottom bar. When I click on the combo label, the popup always shows up at the bottom of the QComboBox. Except it should be displayed on top of the combo box since my widget is located at the very bottom of my application. Here's a screenshot of what happens:
7259
Note: The red square shows the actual area on which the popup is expanded.
So my question is: Is there a way to force the QComboBox's popup position either by subclassing QComboBox or with some stylesheet configuration ?
I checked the QComboBox::showPopup() method already but reimplementing it would mean re-writing all the code concerning the actual creation of the popup widget and I'd rather avoid that.
Any suggestion ?