本文介绍了删除QComboBox“下拉”动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Qt 4.8,并希望摆脱下拉动画时点击一个QComboBox。我也想移动它一点。到目前为止,我一直在寻找重新实现showPopup和hidePopup,但不能弄清楚如何使其工作。

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.

此外,每次我尝试移动或style使用CSS有一个白色的背景,总是存在。 (见图)。

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.

推荐答案

使用:

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

这篇关于删除QComboBox“下拉”动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-25 16:28