Skip to content

Another approach if you're interested.... #1

@PySimpleGUI

Description

@PySimpleGUI

Noticed a post looking for help updating once a second.

I don't have a Qt answer for you...sorry... but I do have a short PySimpleGUI program that will do what you're after in a tiny amount of code.

Totally understand if it's not of interest.... sorry if I overstepped any lines in offering it up.... simply wanted to help if possible.

Wishing you the best of luck in your programming journey....

image

import PySimpleGUI as sg

layout = [  [sg.Text('Track the mouse')],
            [sg.Multiline(size=(40,10), reroute_stdout=True, key='-ML-')],
            [sg.Button('Exit')]  ]

window = sg.Window('Mouse Locator', layout)

while True:
    event, values = window.read(timeout=1000)
    # print(event, values)
    if event == sg.WIN_CLOSED or event == 'Exit':
        break
    print(window.mouse_location())

window.close()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions