Skip to main content

Auto scroll label for PyQt6

Project description

QAutoScrollLabel

This is a Widget that I made on my own to start practicing my knowledge of pythhon and PyQt, it will show in the code itself and in the documentation and notes that I am newbie on this.

Widget preview

This is a preview of the Widget with its default Text, The text in this widget moves automatically if the text is larger than the Widget itself.

QAutoScrollLabel Preview

How to use

Widget initialization

To initialize the Widget you will need to instantiate the QAutoScrollLabel class, which has two optional arguments which are parent of type QWidget and debug of type Boolean; after this the show() function must be called.

Debug

The function debug must be used to set or change the debug status, it acepts an optional boolean parameter.

  • If True: The widget will start printing the following data every tick: debug(True)

    • Orientation: The ocurrent orientacion of the scrolling.
    • Pos: ScrollBar current position in Pixels.
    • Max: The maximum scroll value in Pixels.
    • Vel: The amount of pixels to scroll every tick.
    • Time between ticks: The time in seconds between one tick and the next one.
    • Ticks Per Second: The number of ticks each second.
  • If False debug(False) The widget will stop printing debug info.

  • If None or no parametr given debug(None) or debug() The debug status will be inverted (False -> True or True -> False)

Set Debug

The function setDebug() will let you set a custom calleable object to use as widget debug, this function requieres a calleable object in the parameter debug_fun, please use this function before the function show()

Debug Status

The debugStatus property returns a boolean value depending on the current state of debbuging.

Set Velocity

The setTimeBetweenTicks() function will allow you to configure the pixels that the scroll bar will scroll each Tick, this function requires a parameter of type Int

Set Time Beteen Ticks

The setVelocity() function will allow you to configure the time between each Tick, this function requires a parameter of type Float or Int

Velocity

The velocity property returns the pixels that the scroll bar will scroll each Tick.

Orientation

The orientation property returns the Current orientation of the text.

Time Beteen Ticks

The timeBetweenTicks property returns the time between each Tick.

Set Text - Inherited from ScrollLable(QScrollArea)

The funtion setText() set a new text in the Widget, this function requires a parameter of type Str.

Text - Inherited from ScrollLable(QScrollArea)

The function text() retuns the current text in the Widget

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

QAutoScrollLabel-1.0.3.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

QAutoScrollLabel-1.0.3-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

Details for the file QAutoScrollLabel-1.0.3.tar.gz.

File metadata

  • Download URL: QAutoScrollLabel-1.0.3.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for QAutoScrollLabel-1.0.3.tar.gz
Algorithm Hash digest
SHA256 96afa106e9294136cd0ce6c4177d878eb85b5906546608bf82e5cc83224a16b1
MD5 ddfd029c9e3b8012668c90eb80ad0dd7
BLAKE2b-256 6cf8725ade0dde372d917c288ed019aa780f847c244c05a9c5736bbf51f938b1

See more details on using hashes here.

File details

Details for the file QAutoScrollLabel-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: QAutoScrollLabel-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 14.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for QAutoScrollLabel-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bcf4574cac9f89d1d21ef2194e6465322ffcca6785e024786750f3a61875ab58
MD5 0f17b2955e2e57de45364a0411eb63aa
BLAKE2b-256 06cb24492408ac7cccf82245c4a236a282e5a4d4af8ded072f2d69bb8db914af

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