Skip to content
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

Open
wants to merge 2 commits into
base: qt
Choose a base branch
from
Open

Qt listbox #5824

wants to merge 2 commits into from

Conversation

ksoze95
Copy link
Contributor

@ksoze95 ksoze95 commented Dec 28, 2023

Resolves: #4749

Implemented a basic styled qml listbox. This implement have hardcoded items and callbacks.

  • I signed CLA
  • The title of the pull request describes an issue it addresses
  • If changes are extensive, then there is a sequence of easily reviewable commits
  • Each commit's message describes its purpose and effects
  • There are no behavior changes unnecessary for the stated purpose of the PR

Recommended:

  • Each commit compiles and runs on my machine without known undesirable changes of behavior

Currently with hardcoded listbox descriptions and callback entries.
@ksoze95 ksoze95 added Task Tasks for the team, typically in conjunction with sprints and projects UI UI bugs and programming tasks 3.5 label indicating Qt tasks chosen as priorities during 3.5 milestone labels Dec 28, 2023
@ksoze95 ksoze95 added this to the Audacity 4.0 milestone Dec 28, 2023
@ksoze95 ksoze95 self-assigned this Dec 28, 2023
@ksoze95 ksoze95 linked an issue Dec 28, 2023 that may be closed by this pull request
color: UiTheme.strokeColor1
}

MouseArea {
Copy link
Collaborator

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 {
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.5 label indicating Qt tasks chosen as priorities during 3.5 milestone Task Tasks for the team, typically in conjunction with sprints and projects UI UI bugs and programming tasks
Projects
Status: To-Do
Development

Successfully merging this pull request may close these issues.

Implement a Listbox onto the QML uicomponent library
2 participants