-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Qt listbox #5824
base: qt
Are you sure you want to change the base?
Qt listbox #5824
Conversation
Currently with hardcoded listbox descriptions and callback entries.
color: UiTheme.strokeColor1 | ||
} | ||
|
||
MouseArea { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that I think case I think you can use https://doc.qt.io/qt-6/qtquickhandlers-index.html
instead of writing assignemnt functions you can use bindings:
color : (hoverHandler.hovered || tapHandler.pressed) ? ...
HoverHandler { id : hoverHandler }
TapHandler { id : tapHandler }
Or may be you don't need that at all since Button
and Control
types provide pressed
and hovered
properties (for the latter you'll need to enable hoverEnabled
)
popup.visible = true | ||
} | ||
|
||
Window { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't Popup
type good enough to use here? Window
seem to be a quite heavy type just to display a dropdown list.
Resolves: #4749
Implemented a basic styled qml listbox. This implement have hardcoded items and callbacks.
Recommended: