Skip to main content

A command palette widget for Qt applications

Project description

qt-command-palette

PyPI - Version PyPI - Python Version

A command palette widget for Qt applications. This module provides a Pythonic way to register command actions to any Qt widgets.

Installation

pip install qt-command-palette

Usage

  • Register functions using register function.

    from qt_command_palette import get_palette
    
    # create command palette instance (with optional app name as an argument)
    palette = get_palette("myapp")
    
    # prepare a command group
    group = palette("Command group 1")
    
    # This function will be shown as "Command group 1: run_something"
    @group.register
    def run_something():
        ...
    
    # This function will be shown as "Command group 1: Run some function"
    @group.register(desc="Run some function")
    def run_something():
        ...
    
  • Install command palette into Qt widget.

    # instantiate your own widget
    qwidget = MyWidget()
    
    # install command palette, with optional shortcut
    palette.install(qwidget, "Ctrl+Shift+P")
    
    qwidget.show()
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qt_command_palette-0.0.10.tar.gz (164.9 kB view details)

Uploaded Source

Built Distribution

qt_command_palette-0.0.10-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file qt_command_palette-0.0.10.tar.gz.

File metadata

  • Download URL: qt_command_palette-0.0.10.tar.gz
  • Upload date:
  • Size: 164.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.24.0

File hashes

Hashes for qt_command_palette-0.0.10.tar.gz
Algorithm Hash digest
SHA256 cf6f0692bfd26345b677422c263f3697c8ad71bb2c56165f35d9ddfe51c81636
MD5 81cec76b12682e93eb208dbfa08bf4b4
BLAKE2b-256 3b36fc5ac4129c984cd209d711d68720100c6338e3ec490a1572bc61a678b07c

See more details on using hashes here.

File details

Details for the file qt_command_palette-0.0.10-py3-none-any.whl.

File metadata

File hashes

Hashes for qt_command_palette-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 ff1b9bdf2c3518228f80555b32156efbaa1cdc777a8e642ba0bbb4403a106877
MD5 78fdd995d19b72ab301d13ea26e46378
BLAKE2b-256 6f00e66dd0ebc3d9bb41f8099ad99989ca9bc515b520ab82a27f00ba3ce4c4ef

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page