Removing QComboBox “Drop-Down” Animation

我们两清 提交于 2019-12-23 01:13:41

问题


I am using Qt 4.8 and would like to get rid of the "Drop-Down" animation when clicking on a QComboBox. I also want to move it a bit. So far I've been looking at re-implementing showPopup and hidePopup but can't figure out how to make it work.

Additionally, every time I try to move or style using CSS there is a white background that is always there. (See picture). Any help would be appreciated.


回答1:


Use QApplication::setEffectEnabled:

QApplication::setEffectEnabled(Qt::UI_AnimateCombo, false);


来源:https://stackoverflow.com/questions/14150748/removing-qcombobox-drop-down-animation

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!