Does anybody knows how to make a good search box in Qt (actualy PyQt). It should sit in the toolbar (QToolbar) and look a little different than your normal QLineEdit (rounded corners and an icon as prefix). It should be aligned right with a blank space between the rest of the controls. All tips welcome!
To style a QLineEdit, see the official Qt Documentation. Look for "Qt Style Sheets Examples" and then "Customizing QLineEdit". For Qt 6.5, it's here: https://doc.qt.io/qt-6/stylesheet-examples.html
For the spacing, you can try adding a separator (see QToolBar docs) or add a left margin in the style sheet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With