This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PySide2.QtWidgets import QApplication, QWidget | |
from PySide2.QtGui import QIcon | |
import sys | |
class Window(QWidget): | |
def __init__(self): | |
super().__init__() | |
self.setWindowTitle("Conversor de arquivos") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class WidgetFrame(QWidget): | |
def __init__(self): | |
super().__init__() | |
self.createTable() | |
# Add box layout, add table to box layout and add box layout to widget | |
self.layout = QVBoxLayout() | |
self.layout.addWidget(self.tableWidget) | |
self.setLayout(self.layout) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PyQt5 import QtCore, QtGui, QtWidgets | |
from PyQt5.QtWidgets import * | |
from PyQt5.QtGui import QIcon | |
from PyQt5.QtCore import Qt, QPropertyAnimation | |
import sys | |
''' | |
============================================================================================================= | |
Cada classe herdando QWidget equivale a uma tela disponível para exibir. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PyQt5.QtWidgets import * | |
from PyQt5.QtCore import Qt | |
import sys | |
''' | |
============================================================================================================= | |
Cada classe herdando QWidget equivale a uma tela disponível para exibir. | |
''' | |
# Classe para capturar o caminho dos arquivos e apontar onse será salvo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ************************ 2 - CRIA AS ACOES DO CRUD NA CLASSE DA TELA | |
from DatabaseManager import NewDatabaseManager | |
import xlrd | |
dbm = NewDatabaseManager(server_name='localhost', database='ALTERDATA_BIMER', logger_file_name='log_de_conexao.log') | |
# FUNÇÃO PARA CAPITALIZAR PALAVRAS | |
#p = ['da','das', 'de', 'di', 'do','dos', 'du', 'para', 'com', 'a', 'e'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.lang import Builder | |
from kivy.uix.boxlayout import BoxLayout | |
from kivy.properties import ObjectProperty | |
from kivymd.uix.list import ThreeLineIconListItem | |
from kivy.uix.screenmanager import Screen | |
from kivy.network.urlrequest import UrlRequest | |
import json | |
from kivymd.app import MDApp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.lang import Builder | |
from kivy.uix.boxlayout import BoxLayout | |
from kivy.uix.image import AsyncImage | |
from kivy.properties import ObjectProperty | |
from kivymd.uix.list import ThreeLineIconListItem, ThreeLineAvatarListItem | |
from kivymd.uix.list import ImageLeftWidget | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Conexão com o banco Postgres: | |
from datetime import datetime | |
from peewee import PostgresqlDatabase, CompositeKey, Model, CharField, DateTimeField | |
db = PostgresqlDatabase( | |
'ALTERDATA_WSHOP', # Required by Peewee. | |
user='postgres', # Will be passed directly to psycopg2. | |
password='#abc123#', # Ditto. | |
host='localhost') # Ditto. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Criando as classes com PeeWee | |
#Conectando ao PostgreSQL | |
python -m pwiz -e postgresql -u postgres -s wshop -P 5432 ALTERDATA_WSHOP | |
# Classes do Shop | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Fala galera, A live de peewee foi top, aprendi coisa pra caramba, então fui aplicar juntos o peewee + KivyMD. | |
Estou tentando construir uma lista com uma imagem al lado usando TwoLineIconListItem do KivyMD. | |
Antes de falar meu problema fiquem sabendo que consegui fazer essa lista pegando dados de requests, acredito | |
sinceramente que meu problema é o momento de adicionar os widgets, mas vamos prosseguir: | |
Abaixo estão os códigos main.py e main.kv separados, quando eu rodo o código recebo o retorno gigante do Traceback | |
que vou colar no fim desse código. |