QLineEditをスタイリングして、検索ボックスとして使用するために境界線を丸くします。境界線自体の丸めは簡単でしたが、フォーカスがあるときにウィジェットの強調表示された部分を丸める方法を私は一生理解できません。QLineEdit :: focusを試しましたが、これは内側の境界線のみを変更します。以下の画像は、フォーカスを取得すると、丸みを帯びたqlineeditの錯覚がどのように失われるかを示しています。
QListView, QLineEdit {
color: rgb(127, 0, 63);
selection-color: white;
border: 2px groove gray;
border-radius: 10px;
padding: 2px 4px;
}
QLineEdit:focus {
color: rgb(127, 0, 63);
selection-color: white;
border: 2px groove gray;
border-radius: 10px;
padding: 2px 4px;
}
QLineEdit:edit-focus {
color: rgb(127, 0, 63);
selection-color: white;
border: 2px groove gray;
border-radius: 10px;
padding: 2px 4px;
}