QSpinBox
makes its contents selected (highlighted) upon using up/down buttons. Is there any way to disable this?
Is there any way to clear selection, other than use my own subclass of QSpinBox
to access the underlying QLineEdit
?
相关问题
- QML: Cannot read property 'xxx' of undefin
- QTextEdit.find() doesn't work in Python
- QT Layouts, how to make widgets in horizontal layo
- QT Layouts, how to make widgets in horizontal layo
- QT GUI freezes even though Im running in separate
相关文章
- ubuntu20.4中c#通过c++库调用python脚本
- Qt槽函数自动执行多遍
- Is there a non-java, cross platform way to launch
- How to get a settings storage path in a cross-plat
- How to set the font size of the label on pushbutto
- Why doesn't valgrind detect a memory leak in m
- QTreeView remove decoration/expand button for all
- qt界面拥挤
There's no way to directly disable it, but you can do a bit of a hack:
I recommend connecting to this using a queued connection, like this:
This will ensure that the slot is called after the line edit is highlighted.