In QInputDialog how do I get rid of the icons in the OK and Cancel buttons?
Notice the the icons for cancel and ok. I looked through the properties button couldn't figure out how to remove them.
In QInputDialog how do I get rid of the icons in the OK and Cancel buttons?
Notice the the icons for cancel and ok. I looked through the properties button couldn't figure out how to remove them.
Copyright © 2021 Jogjafile Inc.

The strategy of the solution is to first obtain the buttons, but these belong to a
QDialogButtonBox, so you must use thefindChild()method, then reset the icons, there is only one problem, that the buttons are created when necessary, for example when it is visible or when you change theokButtonTextorcancelButtonText. For example in the we can force it by making it visible.But if you use static methods like
QInputDialog::getInt()we will not be able to access theQInputDialogdirectly, we have to do it a moment after showing theQInputDialogwith aQTimer, so there are 2 cases: