Skip to content

Commit

Permalink
Update Critoniano.py
Browse files Browse the repository at this point in the history
  • Loading branch information
YagoAamaral authored Sep 11, 2024
1 parent 6420eb1 commit 611b0a1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Critoniano.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import subprocess
import random
import sqlite3
from pynotifier import Notification
from pynotifier import notification
from PySide6 import QtCore, QtWidgets, QtGui
from PySide6.QtCore import QPropertyAnimation

Expand All @@ -29,10 +29,10 @@ def __init__(self, nome): # Aceitar o nome como parâmetro
self.notify_button.clicked.connect(lambda: self.show_notification(nome))

def show_notification(self, nome):
Notification(
notification(
title='Cadastro realizado',
description=f'O nome {nome} foi salvo com sucesso!',
icon_path='', # Se houver um ícone, especifique o caminho aqui
icon_path='',
duration=10 # Duração da notificação em segundos
).send()

Expand Down Expand Up @@ -141,7 +141,7 @@ def contui(self):

@QtCore.Slot()
def save_name(self):
nome = self.input.text().strip() # Remover espaços em branco
nome = self.input.text().strip()
try:
if nome:
self.cursor.execute("INSERT INTO nomes (nome) VALUES (?)", (nome,))
Expand Down

0 comments on commit 611b0a1

Please sign in to comment.