#user-interfaces

1 messages · Page 19 of 1

oak hearth
#

thank you

magic ridge
#

Is it the okay button inside the error_win() function?

oak hearth
#

yes

magic ridge
# oak hearth yes

The back button is implemented slightly differently than then "OK" button. The back button uses TopLevel(), which is the correct thing to do. The "Ok" button uses Tk() which you do not want. You only want one Tk() instance running per application.

oak hearth
#

oh thank you

#

now i get it

oak hearth
#

hello guys its me again.
can I use tkinters scrollbar while using place method. if there is can you guys recommend me a good tutorial on that. Help would be appreciated!

sleek arrow
#

just put the scrollbar shit in a frame in then just use place on the frame

heady citrus
#

@odd glacier

odd glacier
heady citrus
#

what's that

#

oh it loaded now wait lemme see

odd glacier
#

see how scaling is ocky

heady citrus
#

yeaah

#

show me the output

odd glacier
#

of?

heady citrus
#

the code

odd glacier
#

ya mean this

#

we love my prints

#

dont stress

heady citrus
#

this is fucken up is crazy 😭✋

odd glacier
#

It was yesterday

#

It was running twice

#

It ain't anymore

heady citrus
#

that's good

odd glacier
#

Well I have set_active_tab

#

And open_tab_set_window

#

I was calling open_tab then set active

#

But open tab set calls set active

heady citrus
#

i see

odd glacier
#

But yeah everything is customizable so far

heady citrus
#

i know very little bout coding for uis but keep me updated man

odd glacier
heady citrus
#

UIs*

odd glacier
#

all done in tkinter

heady citrus
# odd glacier

also btw if you're looking for a good font for the ui, choose SF Pro Display

odd glacier
#

I can't lie I was gonna use Segoie

#

Seguioe?

heady citrus
#

segoe ui

odd glacier
#

The vs code one

heady citrus
#

no pls

#

sf pro display will be better trust me

odd glacier
#

I was gonna make it changeable to be honest

#

Just list all fonts

heady citrus
#

do that

#

the users will love you

#

if you add an option to customize ui font

odd glacier
#

Ofc I will there's so much shit to do

heady citrus
#

some apps/launchers dont give that option and istg its so annoying man 😭

odd glacier
#

Doing plug in support

heady citrus
#

thats crazy

#

in a good way

heady citrus
odd glacier
#

Well for adding to menu

editor.add_menu_item( "BMT Options", self.run_bmt_options )

#

I even have started work on a syntax checker

#

Runs through code in the open window

#

And says this looks wrong to me, are you sure?

heady citrus
#

sounds cool

heady citrus
#

💀

#

💀

#

💀 _ _

#

-# 💀

odd glacier
#

Well I so far have stored all while loops

#

And the lines in them

#

If while loop does not have waittill or wait notify

#

It's been rough

#

Next is if line ends with ; but starts with if function while for else

heady citrus
#

continue

odd glacier
#

Continue ends in ;

heady citrus
#

no bruh i said "continue" as in go on 😭

odd glacier
#

if( value == value2 ) {
continue;
}

odd glacier
heady citrus
#

😭

odd glacier
#

But yeah there's fuck loads of syntaxing things to check

heady citrus
#

average programmer experience lmao

heady citrus
odd glacier
#

if function is defined but not called

#

Nah it's fraz

#

From the bbcc

heady citrus
#

who's that

odd glacier
#

Bad boy chiller crew

heady citrus
#

why did his eyes getting pulled together while wearing the mask?

heady citrus
#

sounds like a LOTTA work

#

but dont give up

#

you're doing great now

odd glacier
#

with a batch?

#
@echo off

echo Installing customtkinter...
pip install customtkinter

if errorlevel 1 (
    echo Failed to install customtkinter. Exiting...
    pause
    exit /b
)
echo Running main.py...
python "%USERPROFILE%\main.py"

pause
#

i had this for somet else

odd glacier
odd glacier
#

so this works anyways

#

so the treeview is simple

#

whats shown in the treeview is self.workingpath

#

it populates the tree by either if the item selected starts with u"\u00AC" we remove suffix and add that to self.workingpath

#

if the user clicks go back
we take that away

#

could i have done cascading file tree, yes, will i down the line, maybe, right now its made to be working in a specific folder

#

.csc and .gsc files

#

^ no

frank cedar
#

This video demonstrates how a Python User Interface can be designed using a simple application like Microsoft Paint and GIMPy-Widget-UI library

frank cedar
clear orbit
#

Hey guys, I’ve developed a Python program in Spyder for the company I work for and now they want to use it. They’ve asked me to create a basic user interface for the program. I don’t have any experience with UI development, so I’m looking for some advice on where to start. I’ve heard that integrating the program with Excel could be an option.

sleek hollow
odd glacier
mossy forge
#

So, I have a question. When using PySide, is there an easy option to create a shortcut that would listen for specific key combination even when window would have been out of focus?

cosmic dove
#

Want one a shopping menu look like for tkinter?

heady cave
mossy forge
#

Or at the very least I'm not able to find any documentation about it

royal gull
#

QHotkey is one of a few Qt-idiomatic utilities for it. But it's primarily used in C++, I'm not sure if there's a Python binding. There's one called PyQxtGlobalShortcut but it hasn't been maintained in a while (only seems to be for Qt 5, for one).

mossy forge
royal gull
mossy forge
royal gull
proven basinBOT
#
Pasting large amounts of code

If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

mossy forge
# royal gull !paste Can you share a small example of how you're setting it up?

well, for now I just added it like it was shown in the link you've posted, but here's most of my main.py file:

if __name__ == "__main__":
    app, overlay, setup, master, worker = setup_application(path=os.path.dirname(os.path.abspath(__file__)), cuda=cuda.is_available())
    with keyboard.GlobalHotKeys({
        '<ctrl>+<shift>+t': setup.toggle_overlay}) as t:
        t.join()
    sys.exit(app.exec())
#

for context, setup_application handles (among few other things) creating QWidgets that would display the app

royal gull
mossy forge
#

But for some reason something works differently when calling the method via the hotkey rather than via QPushButton

#

And I'm not sure why

royal gull
mossy forge
#

If you want I can post a link to my GitHub repo with it

royal gull
#

Sure.

mossy forge
#

anyway, the method in question is toggle_overlay of the class SetupWindow

#

and I tried implementing hotkey by adding this

self.hotkey = keyboard.GlobalHotKeys({'<ctrl>+<shift>+t': self.toggle_overlay})
self.hotkey.start()

at the end of the __init__ method and this

self.hotkey.stop()

at the start of closeEvent method

royal gull
mossy forge
#

When using hotkey though, it only runs verify_and_load_models

royal gull
mossy forge
#

Also, if that changes anything, the QTimer is not running on that thread with the TranslationWorker

#

Ah

#

"Because of this, you must start and stop the timer in its thread; it is not possible to start a timer from another thread."

#

That's possibly the issue

#

As the method is probably called from the thread the pynput uses

royal gull
#

Yeah, I recently helped someone with a similar issue where they wanted to set a timer interval while it was running but from a different thread to where that was happening. I suggested as a workaround to use a singleshot timer and simply call timer.start in the timeout slot as if it were a typical timer (since that should hopefully take care of the thread affinity thing mentioned in the page). In this case, yeah, you can also try moving the timer to the translation worker and using signals to interact with it from the GUI (which would probably work better).

mossy forge
#

And I'm not even sure if that would have even solved that

#

I guess an alternative would have been to have the timer always ticking and innstead just having a boolean that would have told the method to do nothing when it is set

zealous hatch
#

Even though its a private tool, I was hoping to get some feedback as I'm new to front end UI development being a data scientist. I still want to improve in all areas I try.

in order; main window, CSV file options popup, source options dropdown, format options dropdown, analysis dropdown.
(if Im using the word dropdown correctly to describe an integrated window that loads when you click a tab?)

I haven't looked at any graphic design stuff and this is only like my third UI.

royal gull
zealous hatch
hearty matrix
#

Could anyone help me convert a Kivy project (its just a simple hello world; I want to test) into an apk file? I'm on Windows, and I've tried multiple online resources like using WSL or using google colab, but none of them seem to work.

wheat pawn
#

hi, I'm using pyqt with pyside2 and I'm trying to add a toolbar corner widget to a tabwidget, but the text in the buttons gets cut off. does anyone happen to know how to fix this? Do I have to edit some css somewhere? Edit: Think I figured it out, changed the padding css so there's no padding on the top and bottom, doesn't clip text anymore

cosmic dove
#

How can I make a shopping gui?

candid fern
#

is there a way of changing the size of the font on tabs?

dapper mirage
#

@static cove im trying to update it with main.py so i can treat it like an api after, then use it as a better console for print statements with tooling

static cove
#

!paste use the pastebin pls

proven basinBOT
#
Pasting large amounts of code

If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

dapper mirage
#

so far tried queues, and delays for sending messgaes

#

ah sure let me remove the wall

static cove
#

I can take a look tomorrow and let you know

dapper mirage
#

i still need to clean it up its gotten a bit messy from trying out ai solutions since original attempts didnt work

dapper mirage
dapper mirage
# static cove I can take a look tomorrow and let you know

got rid of all the ai suggestions and redid it and cleaned it up a bit since, trying to dynamically update a class variable to use the app loop to update the message now, definitely making more progress, ai was giving me alot of bad suggestions reading through it

dapper mirage
pine arrow
#

I keep hearing that about AI ( crap code ) , Mmm I made a typing text to speech interface , its locked into one process ( GUI loop OR speech , NOT both ) , need to do asyncio thingy @dapper mirage

dapper mirage
#

Havnt used tk a lot prior so thought it’d push me in the right direction originally but just sent me on a wild goose chase so not touching that again anytime soon

#

It even broke my creation pattern

#

With recommendations it gave

pine arrow
#

Tkinter is good for prototyping - and Im just flipping bits on a breadboard so Im all good with it - can add Tkinter and Pygame into same GUI , check Pygame room on discord thats where I saw that

#

@dapper mirage

dapper mirage
pine arrow
#

I do all my testing on W10 PC but also run it on Ubuntu 32 bit OS for RPI3B+ , the CPU runs very hot , added a tiny fan @dapper mirage

#

that is for Tkinter and pygame experiments

dapper mirage
#

Yeah that was my big issue with using pygame since it’s a constant buffer, tbh originally I wanted to just update the ui by calling events but Aparently it still needs to run a loop

pine arrow
#

so if no GUI loop , runs lower CPU loading ?? @dapper mirage

#

ohhh ok just figure it out - pygame a power pig , not Tkinter

dapper mirage
#

But yeah usually it’s a bit of a hog

pine arrow
#

what if draw line data with CANVAS in Tkinter - to draw waterfall maybe ? @dapper mirage

dapper mirage
#

Atleast with python

pine arrow
#

ya i have to learn SSH , headless remote of a PI , make some LEDs toggle @dapper mirage

dapper mirage
pine arrow
#

I will set up a RPI ( raspian lite ) and give it a good poke @dapper mirage

junior rampart
#

How would I run a GUI that previews images in real-time from the I/O point of view? Multiprocessing or asyncio streams? And how would I share the images between the GUI and the processing thread/process? gRPC and base64 data?

#

I want to capture a webcam as input, do some transformation, and preview the result inside a GUI widget if it is visible while not damaging the GUI's performance nor taking to long to render such that the next processing operation wouldn't happen after the next frame. From the I/O point of view.

#

I read about the per-interpreter GIL in the 3.12 change notes, could that help?

#

Has anyone tested those multi-core Trio libraries for parallel cpu-bound tasks?

spiral apex
junior rampart
#

not qtrio, but through trio

spiral apex
#

Yes you can use trio guest mode with tkinter

junior rampart
proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @scarlet tangle until <t:1736681977:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @digital rose until <t:1736692962:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

odd glacier
#

anyone know how to fix glitching with paned window?

#

done

lone minnow
odd glacier
odd glacier
#

change to treeview

#

two columns

#

0 + 2 goes in text

#

1 + 2 goes in value

#

could be somet like

treeview.insert("", "end", text=self.whatever[i] values=(self.whatever[1 + i)

#

missed a comma, you get it

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @lethal ferry until <t:1736807692:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

main summit
#

Hello! I need to create a small IDE in Python, but I don't know any lib for the user interface other than Tkinter... Do you have any recommendations?

shell crystal
main summit
shell crystal
green pelican
#

I'm trying to load icon files from exe files on my compter into a pyqt5 table

#

but it no work :(

#

and it hurts my soul

frosty fiber
#

could someone with experience in DearPyGui chime in with a first guess as to why this is happening...

#

one moment, i'll paste a link to the relevant code...

#

I suspect that this has something to do with clipping and I'm not handling it properly. I've never setup mouse-drag-panning before within a UI toolkit so I'm a lil bit lost...

#

I also think that the map-viewer-window isn't setup properly with the draw-list inside it?

#

oh and probably don't need to say this, but in that posted GIF above the drawlist shouldn't be disappearing just because the window is being resized...

#

and the drawlist only disappears when dragging the window to certain places which is why I think this pertains to clipping....

#

and mouse-drag-panning within the window is even worse, lol. it flickers and jitters and resets.....

#

the mouse-drag-panning only works within certain areas of the window and it's SUPER sensitive...

frosty fiber
quaint cape
#

Yo any ideas for how the ui should look (i suck at designing)

frosty fiber
ruby crystal
#

hi
which library do you recommend for TUIs?
textual, textualize or pytermgui?
or something else?

shell crystal
shell crystal
regal lily
#

Im developing an application and have just migrated from PyGTK3 to GTK4, I was using an icon application pystray which made creating a tray icon simple, It seems to call GTK3, what, if any, is the best way to get both to work? File "/home/user1/.local/lib/python3.13/site-packages/pystray/_appindicator.py", line 20, in <module> gi.require_version('Gtk', '3.0') ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ File "/usr/lib/python3.13/site-packages/gi/__init__.py", line 117, in require_version raise ValueError('Namespace %s already requires version %s' % (namespace, _versions[namespace])) ValueError: Namespace Gtk already requires version 4.0

regal lily
#

Maybe too early, seems wx, pystray, everything still uses gtk3... damn

ruby crystal
quaint cape
#

reposition / rescale only

shell crystal
quaint cape
#

alr good then

quaint cape
odd glacier
#

all of em

vital delta
#

hiya

#

customtkinter

#

thinking of dividing parts of the app into their own small window or smth like that

#

and a tab bar at the bottom of the window to access those other windows

#

what do you think about this idea? how can i execute it well?

icy iron
#

Are there any good UI frameworks that have good GUI design tools?

#

I'm on the fence about PySide6 and PyQT6 because of their licenses, and I haven't yet found any drag and drop tools for GTK4 yet

#

My main goal is to write an app that can run on all three major desktop OSes (Win, MacOS, Linux)

#

Kivy may be an option

royal gull
# icy iron I'm on the fence about PySide6 and PyQT6 because of their licenses, and I haven'...

While I would consult each license for details (Choose A License has a neat overview), PySide6 provides a more lenient license (the LGPL) which means that you only need to provide the source code of the modifications you've done to PySide itself to whomever asks for it (the GPL used by PyQt is a bit more strict in this regard). Both packages provide commercial licenses in case you are not able to meet those requirements.

Similarly to Qt (which has Qt Designer), GTK also has a few design tools. The one particular of note here is Cambalache which exports your UI as an XML file that can then be loaded with GTK. Here's a small guide on it. Kivy previously had designing tools, but they're unmaintained afaik.

If your UI not being "native" isn't a requirement, another option could be shipping a web app wrapped as a standalone package. A popular Python package for this is pywebview. pywebview uses the "native" web engine on the platform allowing for smaller bundles and less resource consumption (but with the drawback of having to support multiple web engines).

Some people may even tell you to forgo these designing tools completely as they aren't as flexible as writing code and may be harmful if you're trying to learn a particular UI. My opinion on this is to feel free to choose either option (UI via code or via design tool) but to be very careful about the way you go about it.

somber hemlock
#

tekgar explains it well. i personally would go with the web ui approach. learning a ui framework is a huge task and in most cases it isn't worth it at all. most of the times it would just lead you to using a poor man's version of css, react etc. and eventually causing frustration. whereas with web dev, you literally have the best of all worlds.

#

@icy iron

icy iron
#

I see. How well do web ui's perform with python?

#

Are they good for cross platform apps too?

somber hemlock
somber hemlock
icy iron
#

Ooh that's pretty nice, if I can figure out how to get python apps running on mobile I can make it work across 5 or 6 platforms instead of 3 or 4

tight laurel
#

you can make them perform as well as instagram which runs on django.

reef shale
#

I'm looking to make a rather complex GUI
There will be a text output field on the right side and a table on the center and left side [this table can preferably be edited by the user, nothing major just small data correction, in addition it can be filtered ; this table can in theory take a few thousand lines]
In addition there will be the need of quite some buttons, a file selector, and a few menu's.

I basically only know python, which will be enough for my backend. I was considering nice GUI for the frontend as i can do most everything in python. However it is unclear to me if nicegui allows the complexity needed. Does anyone here know? if it is not feasible, what is a good (and well documented) alternative with as few non python things as possible? It needs to be free (for non commercial / open source use)

#

I am not a great programmer by any measure so having to learn a new language for the frontend feels painfull, on the opposite side, discovering near the end of my project that i have to redo the whole GUI also souunds not optimal.

sharp sequoia
#

Hello Everyone

royal gull
# reef shale I'm looking to make a rather complex GUI There will be a text output field on th...

That can probably be done in all of the major Python GUI frameworks. NiceGUI itself relies on the Quasar Framework for components which itself uses Vue. Here are some examples of that. If the components provided by Vue do not allow for that kind of complexity, you can basically insert your own. But, at that point, you might want to consider just using Vue directly for frontend.

PySide6 (one of the major GUI frameworks in Python) probably makes this easier as it has support for the sort of thing you're asking (a layout with buttons and editable tables that can handle a few hundred elements). But again, most frameworks have facilities for this sort of thing (PyGObject, PySide, even Tkinter - albeit with plugins, etc).

solemn jay
#

guys, why is Qt mirrorlist not opening for me, and the default one shows a network error during the installing (qt online installer)
for the solutions for my problem on their site, the suggested changing the mirror through the terminal

echo token
#

hows my vs code?

rigid bone
#

wrong channel, this is for discussing development of user interfaces.

golden lintel
#

Hello,

I am the founder of cvresumenest and I came here with a problem, a huge one .

I started this website a year back , it’s a free resume maker webiste. The thing where I faced the issue is that the design is very bad.

I am trying very hard to fix this but i cannot visualize what needs to be fixed.

Could anyone please advise me what can be improved? What’s bad ?

Would be so grateful ❤️

echo token
#

@dusk crater i was looking if we could colaborate

#

and can any1 rate my ui?

nocturne epoch
#

i got a question so i made an gui with figma now i want it in python is there anyway to get the code for it ? i mean i got figma dev mode so i can get the code in css or just the Proparties of everyframe

errant parcel
heady cave
#

hi, in tkinter, how can you make a frame scrollable using a macos trackpad? like if i drag two fingers up, the frame goes down, and vice versa. also for horizontal. i dont want scrollbars

cosmic dove
#

Has anyone tried to make their own type of discord?

regal cedar
heady cave
cosmic dove
# heady cave ?

If you want to hide the scroll bars but one to still use them you have to use a show command to configure it to not show or to show

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @meager bolt until <t:1737765271:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

heady cave
cosmic dove
heady cave
#

I just want to make it scrollable

#

Like with a trackpad

#

Without scrollbars

cosmic dove
#

Do you know about the show configuration?

tawdry abyss
#

Hi, I am using pyside6 and qt designer. I have a blank disabled QAction widget on a vertical toolbar. Can that widget be set to use up all available vertical space and push the DB icon to the bottom?

atomic portal
#

I know this is not ui but I don't know where to post this

#

why do I get this error?

errant parcel
#

Should've gone in #1035199133436354600

But you're not opening it in a folder, so that means that you're running your code in a separate location to your words.txt file

I'd recommend that you create a new folder and put everything you need into that folder

Alternatively, you can always copy the path of words.txt into the with open('... part

atomic portal
#

I should have thought of that😅

#

ty

cosmic dove
#

How can I make it worse somebody has to put in a birth date?

errant parcel
patent mauve
#

yo

mighty yoke
#

how do i limit the number of window generated when window1 function is called

cosmic dove
#

How can I make limit for allowing a person to view something?

tribal canyon
#

What library does everyone use for GUI applications? Not a big fan of PyQT

mighty yoke
supple otter
supple otter
sleek hollow
tribal canyon
#

sorry. my brain wanted to type tkinter but my hands typed pyqt.

#

I have not used any other libraries and wanted suggestions. I come from a c#/Visual studio winforms background and slowly transitioning to python and it's libraries cause it is kickass

supple otter
#

Figma might be too modern and cloud-based, but Tkinter Designer looks like it can quickly build a modern application from it: https://www.youtube.com/watch?v=Qd-jJjduWeQ


Tkinter Designer was created to speed up the GUI-development process in Python. It uses the well-known design software Figma to make creating beautiful Tkinter GUIs in Python a piece of cake.

Link to Tkinter-Designer - https://github.com/ParthJadhav/Tkinter-Designer
Hello I'm ...

▶ Play video
mighty yoke
#

I am not that good in python i don't know about global stuff or anything

supple otter
#

you could disable the button instead

mighty yoke
icy iron
#

So I've been trying to get a python application with DearPyGUI to compile with both Pyinstaller and Nuitka, but things aren't quite working right. Everything compiles fine, but both produced executables throw the following error:
/home/runner/work/DearPyGui/DearPyGui/thirdparty/glfw/src/window.c:479: glfwWindowShouldClose: Assertion 'window != NULL' failed. Aborted (core dumped)

I've tried including the glfw and dearpygui libraries as hidden imports, but it hasn't really helped. I also tried disabling --onefile but no dice. Here's my build commands:

PyInstaller:
[sys.executable, "-m", "PyInstaller", "--onefile", f"--workpath={BuildDirPath}", f"--distpath={DistDirPath}", "--hidden-import", "'dearpygui.dearpygui'", "--hidden-import", "'dearpygui.core'", "--hidden-import", "'glfw'", "--hidden-import", "'dearpygui'", "--name=Shockfish", "--clean", f"--add-binary={sys.argv[1]}:.", f"--add-binary={sys.argv[2]}:.", "--noconsole", "Main.py"]

Nuitka:
[PythonEXEPath, "-m", "nuitka", os.path.join(CurrentCWDPath, "Main.py"), f"--output-dir={BuildDirPath}", f"--output-filename={EXEFilename}", "--standalone", "--onefile", "--include-module=dearpygui", "--assume-yes-for-downloads", "--remove-output"]

#

These errors show even with the most basic DearPyGUI example.
I'm running these commands inside of a venv (all packages are installed), and on Kubuntu 24.04. What else could I try to fix this?

#

I've also noticed that the app doesn't even run without a console on Wayland, but when I run the script through the terminal, everything works just fine

#

I don't know if it runs fine because there's a terminal though

icy iron
#

After some more debugging, I've found "14019 ERROR: Hidden import "'dearpygui'" not found"

icy iron
#

I tried cx_freeze as well but it throws the same error asd pyinstaller and nuitka

mighty rock
#

Maybe you need to name the Python file with a .pyw extension

#

Or use the pythonw.exe executable rather than the python.exe one

icy iron
regal sky
#

Hey guys, Python newb here, I spent over 10 hours just making these, the buttons are functional and I learnt how to do screen overlays and requests
How can I format the UI better? I really dont like how it looks atm

regal sky
#

i like how it looks now

cunning kettle
#

what would be the python equivalent of EGui

royal gull
cunning kettle
vagrant brook
gloomy ferry
#

?

tidal ocean
flat dew
gray quest
#

ok should I delete it?

icy iron
#

I'm using DearPyGUI, and I'm having some trouble getting callbacks to change values in a class properly. The OkButtonPressed variable is changed with this function:

def SetOkButton(self, Sender, AppData, UserData):
        print(id(self))
        self.OkButtonPressed = True

        if self is UserData:
            print("They're the same object")

And this is the button that calls this function (FD is an instance of my FileDialog class):
IMGUI.add_button(label="Save" if FD.SaveFile == True else "Open", tag="FDOkButton", pos=(WinSize[0] - 148, WinSize[1] - 128), callback=FD.SetOkButton, user_data=FD)

SetOkButton correctly changes the value, but I can only see these changes inside of the callback, everywhere else I check returns False instead of True. I've ensured that FD and self are the same object, and that there is nothing that overwrites OkButtonPressed, what could be the issue here?

#

Also, here's how my FileDialog class is defined:

class FileDialog:
    ## FUNCTIONS ##
    def __init__(self, Title="Shockfish - File Dialog", StartingDirectory=Globals.MainProgramPath, ValidExstensions=[], SaveDialog=False):
        self.DisplayAllFiles = False
        self.IsMouseReleased = True
        self.OkButtonPressed = False
        self.ExtensionFilter = ValidExstensions
        self.DGDisplayed = False
        self.Directory = StartingDirectory + "/"
        self.DGWindow = None
        self.DGClosed = False
        self.SaveFile = False
        self.Filename = None
        self.FSItems = []
        self.Title = Title

    def SetOkButton(self, Sender, AppData, UserData):
        print(id(self))
        self.OkButtonPressed = True

        if self is UserData:
            print("They're the same object, why isn't ts working :(")

    def Show(self):
        GUI.FileDialogs.append(self)
#

So turns out the value only changes after the file dialog is closed?

autumn idol
#

I'm making a game for my school project any tips/suggestions for UI?

gloomy ferry
#

Damn that looks cool

turbid rune
#

i will give 1 billion dollars to make windows 11 clone using only python

proven basinBOT
#

6. Do not post unapproved advertising.

9. Do not offer or ask for paid work of any kind.

dawn briar
#

but who knows

shut yarrow
#

heya yall, working with Tkinter for the first time. Was curious if someone could help me get these columns looking neater 🙂

royal cape
#

you want to put your widgets inside a single frame so they all share the same grid, that way tkinter can pad them out to line up with each other

royal cape
# royal cape you want to put your widgets inside a single frame so they all share the same gr...

something like: ```py
app = Tk()

Label(app, text="Hello" ).grid(row=0, column=0)
Label(app, text="world!").grid(row=0, column=2)
Separator(app) .grid(row=1, columnspan=3, sticky="ew")

Label(app, text="Hello" ).grid(row=2, column=0)
Label(app, text="world!").grid(row=2, column=1)
Separator(app) .grid(row=3, columnspan=3, sticky="ew")

Label(app, text="Hello" ).grid(row=4, column=1)
Label(app, text="world!").grid(row=4, column=2)

allow columns 0-2 to stretch horizontally:

app.grid_columnconfigure([0, 1, 2], weight=1)```

shut yarrow
#

My issue is, I am generating the info from a Dict that is loaded from a CSV

#

ohhhh

#

wait

#

I know how I can do this, thanks for the info

royal cape
shut yarrow
#

This is what I am going for, very nice

royal cape
shut yarrow
#

Interesting, man making it as a class object is massive

#

Idk why I didn’t think of that

valid quiver
#

in the display stuff, you can see 4 button like add1 to add 4

when i click any of those i should get a new pop up window, it should have to entry, one should be preset name and another should be its brightness value, a number field

then a button for submitting (usially apply button), if applied the preset icon and text should be replaced by the name field which the user has typed and when click a popup menu having
3 button, edit, apply, delete

delete button will remove it a put the present name like at the begginging

edit button will give the name and value field which we can use to edit
finally delete apply button will apply the current preset's brightness to the screen (this is the chatGPT entry that i gave but that shit sucks)

#

this is made in customtkinter BTW

#

could anyone help me

#

?

#

If anyone can help me, please ping me

#

here

shut yarrow
hexed owl
brazen heart
#

Hey everyone, may be an elementary question, but how do I fix my margins?
Is it a pagesize problem?

```def generate_pdf_report(self):
    data = [["Employee"] + self.days_of_week]
    for employee in self.employees.values():
        row = [employee.name]
        for day in self.days_of_week:
            if day in employee.shifts:
                shift = employee.shifts[day]
                row.append(f"{shift.start_time} - {shift.end_time}")
            else:
                row.append("")
        data.append(row)
    # Create the document with custom margins to ensure the schedule is not cut off.
    doc = SimpleDocTemplate(
        "schedule.pdf",
        pagesize=letter,
        leftMargin=40,
        rightMargin=40,
        topMargin=40,
        bottomMargin=40
    )
    table = Table(data)
    style = TableStyle([
        ('BACKGROUND', (0, 0), (-1, 0), '#CCCCCC'),
        ('TEXTCOLOR', (0, 0), (-1, 0), '#000000'),
        ('ALIGN', (0, 0), (-1, -1), 'CENTER'),
        ('FONTNAME', (0, 0), (-1, 0), 'Helvetica-Bold'),
        ('FONTSIZE', (0, 0), (-1, 0), 12),
        ('BOTTOMPADDING', (0, 0), (-1, 0), 12),
        ('GRID', (0, 0), (-1, -1), 1, '#000000')
    ])
    table.setStyle(style)
    doc.build([table])```
modest dove
valid quiver
#

@modest dove So are you recommending me to learn PyQt ?
Also is it free or does the free version have any limitation ?

valid quiver
#

Or should i stick with the CustomTkinter (Note that i am using GUI for basic purposes not professionally)

modest dove
#

You can check it out here

valid quiver
#

i felt like its syntax are a bit complicated

#

Any way thank you @modest dove for your kind response, I will try PyQt soon

modest dove
#

No worries man!

burnt gull
#

This the right place to ask for some help with PyQt5?

tepid osprey
burnt gull
#

Sweet! Basically, I'm refactoring an application I created a couple of months ago in PyQt5, just trying to improve / clean it up a bit. I'm creating a custom class for QScrollArea to act as a container for other containers and widgets. But for some reason, there seems to be a minimum size set that i can't change. Doesn't seem to matter what i change, it just won't go away. Feel like I'm obviously missing something.

#
    def __init__(self, parent=None, name=None, hor_policy=None, ver_policy=None, warn=False):
        if not isinstance(self, QWidget):
            raise TypeError("BaseWidget must be used with QWidget subclasses")

        if name:
            self.setObjectName(name)

        self.hor_policy = hor_policy if hor_policy is not None else G.PREFERRED
        self.ver_policy = ver_policy if ver_policy is not None else G.PREFERRED
        self.setSizePolicy(self.hor_policy, self.ver_policy)

        self.warn(warn)
        self.setContentsMargins(0, 0, 0, 0)

        if isinstance(parent, Container):
            parent.add(self)

    def warn(self, warn):
        self.setProperty("theme", "warn" if warn else None)

    def hide(self):
        self.setVisible(False)

    def show(self):
        self.setVisible(True)


class Container(QScrollArea, BaseWidget):
    def __init__(self, parent=None, name=None, vertical=True, hor_policy=None, ver_policy=None):
        QScrollArea.__init__(self, parent)
        BaseWidget.__init__(self, parent, name, hor_policy, ver_policy)
        self.setWidgetResizable(True)

        self.container = QFrame(parent)
        if vertical:
            self.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)
            self.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
            self.layout = QVBoxLayout(self.container)
        else:
            self.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
            self.setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded)
            self.layout = QHBoxLayout(self.container)

        self.container.setLayout(self.layout)
        self.setWidget(self.container)
        self.setMargins(*G.DEFAULT_MARGINS)```
tepid osprey
#

@burnt gull You should put code in code block with 3 of these signs `

hidden pine
#

Please what is PyQt, I'm new to python

dawn briar
meager wharf
#

how can i align the center and modify that button style to rounded button?

stone violet
obtuse remnant
#

Anyone using console UI? I'm interested in something like curses, but Windows-compatible. I've tried Urwid for now, it looks nice, but I'm having problems as soon as I try to do anything beside the tutorial, and the documentation seems not to be complete.

#

Are there other console-friendly widget libraries?

shell crystal
#

Unless you're planning to do a super complex thing, you don't really need a TUI library

autumn idol
sleek arrow
#

Canvas

#

Tkinter??

autumn idol
#

yeah

sleek arrow
#

Damn

#

It's good

humble cape
autumn idol
humble cape
#

ahh gotchu

#

then python is def more lightweight

topaz parcel
#

why am i muted

lost pike
#

i'm trying to make a game engine with a cute and purple ui in this style

#

so can anyone help me

candid fern
#

How can I make it so that I can append buttons to notebook so in essence I can close those pages

candid fern
candid fern
regal cedar
#

Im trying to animate something on python using pyqt5 but my animation keeps being cut off. If anyone has experience with this or might know how to fix this please respond to this message so i can provide more assets

(ping me)

glossy kelp
#

can same one help me
I want install pyqt3d using pip
pip install PyQt3D i get this error can be some one help plz
`
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [5 lines of output]
Querying qmake about your Qt installation...
These bindings will be built: Qt3DCore, Qt3DInput, Qt3DLogic, Qt3DRender, Qt3DAnimation, Qt3DExtras.
Generating the Qt3DCore bindings...
_in_process.py: /tmp/pip-install-a5joxwql/pyqt3d_f7eeba296e2f4207af7dafc8e008a7a2/sip/Qt3DCore/Qt3DCoremod.sip: line 25: column 9: 'QtCore/QtCoremod.sip' could not be found
/tmp/pip-install-a5joxwql/pyqt3d_f7eeba296e2f4207af7dafc8e008a7a2/sip/Qt3DCore/Qt3DCoremod.sip: line 26: column 9: 'QtGui/QtGuimod.sip' could not be found
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details`

gray owl
glossy kelp
#

I use vscode

wispy breach
#

can you maybe access the packages?

#

maybe you can install it manually theire

#

it also says something with subprocess so it could be that your environment can’t access the libary for some reason

loud sail
glossy kelp
glossy kelp
digital rose
#

Are these available on your os package manager?

glossy kelp
#

How to fix any cammand ? can help me

glossy kelp
digital rose
glossy kelp
#

yeah

desert igloo
#

has anyone used python to login to network devices, for example cienas, via ZOC terminal?

brisk light
#

I used a library (I think it was called paramiko) for that before

desert igloo
tawdry abyss
#

Hi, using Pyside 6 and making a custom title bar for a frameless window. Here in the image, the top is in QT designer, the middle is ctrl-r in qt designer, and the bottom is in the actual app.

You can see the buttons have moved to the left as if there is some padding or margin on the right. But I can't work out why this is happening. Any tips or clues?

haughty musk
#

Hey everyone, I'm actually trying to dig into project management ( for a project using PyQt ) and I was wondering if there was a way ( i've been looking onnline for the whole day ) to make Modern gantt and calendar ( a bit as with google or notion ) interfaces ! Thanks a lot !

wispy breach
left mist
#

anyone good with figma?

opal hull
#

Guys I need ideas for the header not sure what to do

solid thistle
mellow meadow
solid thistle
#

sorry soory

digital rose
#

anyone using flet?

#

whats ur experience?

reef holly
#

Hi guys, I got a little question, I'm realitve new with user-interfaces with python.

#

which is the most lightweight user interface python library?

glass rampart
reef holly
glass rampart
reef holly
glass rampart
south vine
#

How can I make a good modern looking UI? I dont want to use Tkinter or Customtkinter

pallid birch
south vine
glass rampart
south vine
glass rampart
# south vine yea

I have no experience with pyside, but they say its awesome. You can find videos on youtube.

south vine
#

Just hoped for someone who maybe worked with it

candid fern
#

Does anyone know how to append buttons to notebook tabs

sleek hollow
silver stump
#

Outside of tkinter, how can I make a GUI in python?

light vigil
muted willow
# south vine What abt PySite6?

PySide/PyQt both are essentially the same thing - Python wrappers around the Qt framework. Qt itself is one of the most mature framework so I would recommend that as well. There is nothing that comes close at least as far as I know in Python.

#

Also, if you are planning on using it, I highly recommend you look into the C++ documentation of Qt. It is one of the most descriptive and beautifully documented framework I have seen in my career.

#

The python documentation is automatically generated and hence, is not the best place to start.

It's very easy to understand how you would write the same thing in Python, just a matter of Syntax 🙂

muted willow
tawdry abyss
eternal kestrel
#

Hi, everybody. Do you know streamlit?
I have not well understood when to use st.cache_data or st.cache_ressources . I guess, I should not save larger items in session_state.

I am trying to build a GUI, where people can select files from a folder, user can make a selection of files. They get processed and plotted.

The data of the (all?) files is a lazy dataframe. Should something like this be in st.cache_data ?

#

If you know a nice example, with nice classes for the streamlit gui and the files selection, processing, I would be happy to see it. Would be nice to see how it is done with proper OOP.

lost pike
pallid birch
rare cloak
#

what do you guys think about holoviz panel?

rigid latch
shell crystal
crude umbra
fierce cloak
#

Really sorry for that

#

I deleted messages

south knoll
digital rose
#

civ4

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @quasi dock until <t:1741459043:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

frail snow
#

Hi! Do you recommend using kivy type for a simple application?

crude umbra
frail snow
zealous lagoon
#

Idk if this is the right channel but I don't know why my python looks different from everybody's?

stuck marten
# zealous lagoon

that's not python, that's powershell. How exactly did you expect it to look like?

modest dove
#

How do I make a gui that looks like this? (Doesn't matter which library)

#

Please ping me on resposne :)

crude umbra
modest dove
crude umbra
#

If you are looking for exactly same then I don't think it is possible but it is platform specific. And looking at it, it looks like windows 7 or 8 but still you may try this solution: https://stackoverflow.com/questions/73918178/pyqt5-windowsvista-style-instead-of-win10-style#answer-73920981

modest dove
#

I’ll look into it. Thank you for your help 😁

digital rose
# modest dove How do I make a gui that looks like this? (Doesn't matter which library)

This one looks kind of like a win 7 gui(but dark mode):
https://github.com/TomSchimansky/CustomTkinter

And this one looks like the win 11 winui3 gui:
https://github.com/zhiyiYo/PyQt-Fluent-Widgets

GitHub

A modern and customizable python UI-library based on Tkinter - TomSchimansky/CustomTkinter

GitHub

A fluent design widgets library based on C++ Qt/PyQt/PySide. Make Qt Great Again. - zhiyiYo/PyQt-Fluent-Widgets

digital rose
modest dove
#

I'm sorry if this comes off disrespectful. But i was asking if anyone knew any old windows GUI's & you send a win11 library & a modern windows 10 gui

digital rose
#

ok wasnt sure if you just wanted a windows aesthetic in general

modest dove
#

No no, but thank you

digital rose
#

@modest dove "For the app to look exactly like Windows 7, it needs to be run on a Windows 7 system or one that has the Aero theme enabled in the first place. Modern Windows versions (Windows 10/11) handle window decorations differently"

proven basinBOT
wanton apex
#

guys qtawesome icons aren't working on windows 11 why ?

wanton apex
#

pip install --upgrade qtawesome PyQt6 PyQt6-Qt6```
stiff valve
warm mason
uneven crystal
#

Good morning, I've been trying to find reference on setting up Vulkan inside tkinter but have not found any relevant information. Does anyone know if there has been any discussion about this?

violet fiber
#

any suggestions appreciated

sleek hollow
violet fiber
sleek hollow
#

the coding language is similar to python

#

but you'll have way more tools at your disposal to create all the visuals that you want

brazen shard
#

Hey, had my first time using QT for a basic Deezer RPC ui,
I want a system tray hide feature and i made it, it works normally until I want to compile my python file (code)

But the tray system doesnt work while app is compiled, just hides the app but keeps it working (still works in Task Manager)

Compile Command Used :
```bash
pyinstaller --onefile --noconsole --icon=icon.ico --name=rpc-ui --add-data "icon.png:." --add-data "icon.ico:." rpc-ui.py

Project Structure :
    icon.ico
    icon.png
    rpc-ui.py
    settings.toml

A free Python-oriented pastebin service for sharing Python code snippets with anyone

steady island
#

I have a python project in kivy(for Android) it's a simple quizz app but I just can't get it to my phone i tried everything it seems the only thing I didn't try was using a Linux system so please can I get help from anyone

worthy fox
#

made an epg app out of boredom 🙂 still wip

worthy fox
#

gotta limit the amount of channels it loads at startup, load rest that are needed in background

tired raft
#

yeah

#

for sure

digital rose
#

hey

#

this is my app

#

would anybody like to collab with me?

#

View the code here

shell crystal
#

Also why is there rust for this that only launches the app?

#

At that point just use something like pyinstaller or nuitka

noble wyvern
fallen osprey
#

I was wondering if anyone who wants to could do this in a cleaner way than I did.
Given a list of glass stained blocks in mc i.e ['red', 'blue ', 'lime'] it generates

shell crystal
wheat ether
weak plaza
stone sleet
#

No lounge?

steady trench
cunning tangle
#

Slightly off topic, but I am looking for a cross platform UI framework that can support both Python and Java apps. Do you know if Qt works with Java as well as Python? Thanks.

steady trench
#

did you use any tool for this ?

pallid timber
#

Hey guys, i just started learning tkinter using the lesson provided by pycharm but there seems to be a problem with the color. This is my code:
`from tkinter import *

window = Tk()
window.title("Exercise 2")

topFrame = Frame(window)
secondFrame = Frame(window)
thirdFrame= Frame(window)
lastFrame = Frame(window)

topFrame.pack()
secondFrame.pack()
thirdFrame.pack()
lastFrame.pack()

text1 = Label(topFrame, text="This application demonstrates frame layout")
button1 = Button(secondFrame, text="Button 1", fg="green")
button2 = Button(secondFrame, text="Button 2", fg="red")
button3 = Button(secondFrame, text="Button 3", fg="blue")
button4 = Button(thirdFrame, text="Button 4", fg="green")
button5 = Button(thirdFrame, text="Button 5", fg="green")
button6 = Button(thirdFrame, text="Button 6", fg="red")
button7 = Button(lastFrame, text="Button 7", fg="blue")
button8 = Button(lastFrame, text="Button 8", fg="blue")
button9 = Button(lastFrame, text="Button 9", fg="blue")

text1.pack()
button1.pack(side=LEFT)
button2.pack(side=LEFT)
button3.pack(side=LEFT)
button4.pack(side=LEFT)
button5.pack(side=LEFT)
button6.pack(side=LEFT)
button7.pack(side=LEFT)
button8.pack(side=LEFT)
button9.pack(side=LEFT)

window.mainloop()`
The first pic is what it is supposed to look like and the left is what it looks like after I run my code (also the second one is black cuz i have dark mode on rn)
Thx guys!

modest dove
north steeple
#

please teach me how to make this

modest dove
# north steeple please teach me how to make this

This is how I made the informations tab:


    text = Text.from_markup(
        "[bold green]Sleep Client[/]\n"
        "[magenta]Brought to you by Fundet & Geoloage[/]\n"
        "[yellow]// // ver 1.0.0 // //[/]\n"
        "[green]True: On[/]\n"
        "[red]False: Off[/]", 
        justify="center"
    )
    console.print(Panel(text, border_style="blue", title="Information", title_align="center"))
cunning tangle
#

That looks amazing! I will definitely check out Rich. Thanks!

feral light
#

I've been trying to create a PyQt app where I have a custom header, but windows is showing 5 pixels of whitespace at the top which is ruining my design.
I have tried using Frameless flags but that disables the feauture where windows helps me resize my window
I am trying to achieve the same windows setting that (spotify, vsc, and discord) have on windows,
If anyone knows how to achive this even if its not PyQt, such as (Electron, tkinter) etc please let me know how its done, I cant find anything online

Heres my code:
from PyQt6.QtWidgets import QApplication, QWidget
from PyQt6.QtCore import Qt
import sys

class DummyWindow(QWidget):
def init(self):
super().init()
self.setGeometry(100, 100, 500, 500)
self.setStyleSheet("background-color: red;")
self.setWindowFlags(Qt.WindowType.CustomizeWindowHint)

app = QApplication(sys.argv)
window = DummyWindow()
window.show()
sys.exit(app.exec())

modest dove
proven basinBOT
versed vessel
#

Do you know any good libary with good-looking interfaces without using tkinter?

vast kestrel
hollow matrix
#

depends what the guis for

#

pyqtgraph is good for graphs

versed vessel
#

Need something to pop-up and do changes then save in file, lot of buttons configure

violet fiber
#

i agree with pyqt and qtwidgets

unborn canyon
#

How did you create the blue boxes, this looks sick btw

weary valley
digital rose
celest python
#

here we go

digital rose
#

Long

#

Add different like shades for every two colums

#

So one would be light green one would be dark etc it's easier to read

celest python
#

the rows or columns?

#

because the columns have line separators yhk

celest python
#

@digital rose That gui that i sent is only 262 lines of code

#

gotta love PyQt6

#

its got really nice styling options

#

very customizable

digital rose
#

Loke how excel does it

celest python
#

oh like excel

#

I see

unborn canyon
#

What's that gotta do w me

#

Ion even do ui

#

Oh

#

Nvm

#

I'm dumb

#

I'm like 90% sure that doesn't make a blue border but idk

#

Like it's assigning the border colour but doesn't actually show how you made the border

#

Is it panel in the console.print func ?

modest dove
#

And the other is the contents inside of it 🤦

unborn canyon
#

Right

#

But how does it print the boarder?

#

Is it the panel in the console.print func

modest dove
unborn canyon
#

How do you not know 😭

modest dove
warped quail
#

Can someone help me ? Im using tkinter, and i dont know why but when i click on the button, afterwards it suddenly becomes reactive to hovering (color change and border "inverted) till another button is pressed, how do i get rid of this weird behavior

    self.convert_type_menu = tk.Menu(button_frame, tearoff=0, bg="#444444", fg="white")
    for mode_name in ["Raw", "Hex"]:
        self.convert_type_menu.add_command(label=mode_name, command=lambda m=mode_name: self.file_writer.set_mode(m.lower()))



    def show_menu(event):
        print("show_menu")
        self.dropdown_btn.config(relief="sunken", bg="#2196F3", fg="black")
        self.convert_type_menu.post(event.x_root, event.y_root)
        self.after(1, reset_button)
    
    def reset_button():
        print("reset_button")
        self.dropdown_btn.config(relief="raised", bg="#2196F3", fg="white")


    self.dropdown_btn = tk.Button(button_frame, text="▼", bg="#2196F3", fg="white")
    self.dropdown_btn.pack(padx=(0, 5),side=tk.LEFT)
    self.dropdown_btn.bind("<Button-1>", show_menu)
errant bone
#

EasyCard+, A simple flashcard editor/viewer
I made a flashcard program using pygame to study for exams. It also has audio-hints that you can record in the
audio recorder that I built into it. I also made it easy and somewhat fun to create, and edit flashcards. I used tkinker
& easygui for popups btw. It was really annoying but I did add support for exporting to PDF, however I couldn't get
the in PDF audio working so I just made it an embedded file. I also put it on my itch.io: https://vmanisherenow.itch.io/easy

itch.io

Easy Flashcard Software

clear willow
#

how do you fix these gap when the mouse move too fast

 def start_drawing(event):
    global drawing
    drawing = True
    x = event.x
    y = event.y
    
    if drawing:
        canvas.create_oval((x - brush_size / 2, y - brush_size / 2, x + brush_size / 2, y + brush_size / 2), fill=selected_colour, outline=selected_colour)
       

def stop_drawing():
    global drawing
    drawing = False


canvas.bind('<B1-Motion>', start_drawing)
canvas.bind('<ButtonRelease-1>', stop_drawing)```
sinful pendant
sinful pendant
candid fern
#

Is it possible to make an interface that can add or make a database?

glossy burrow
candid fern
#

Well I wanted to make a medical program and so I don't have to find a database online after getting everything done I want to make it so that it makes the database

I like for example
Ex.
Name: iron fox
Age: 118
Gender: n/a
Contact_info: ggggf

glossy burrow
#

Well I mean its a lot more complicated than just 'making a database' as I assume you plan to read from it, add new patients, update information, etc. But yes it is all possible to do and something I am actively working on myself for a different type of program

vast kestrel
#

If your 'things' have a more well-known structure in advance, just defining them directly as database 'models' would be easier.

candid fern
vast kestrel
candid fern
#

I tried to follow myseqel as perfect tutorial haven't been able to find an import for Windows terminal

candid fern
vast kestrel
#

pip install pydantic works fine too. Make sure your pip is set up reasonably I guess?

candid fern
#

Which one would you recommend?

vast kestrel
#

Sorry, what are you asking exactly?

candid fern
#

Which one do you prefer and I got to run now turns out it was using the wrong

vast kestrel
#

I don't know your exact situation, but..

#

I personally would prefer to use 'just' SQLAlchemy, and pre-define what all my models looked like.

#

If you need something where the user is deciding on the attributes of things each time at runtime, you might want to get Pydantic involved.

#

So it really depends on your goal. SQLAlchemy on its own is a simple great way to store your objects in a database.

#

If that feels like "grr, this isn't enough like JSON", then that's when Pydantic would come in.

candid fern
#

import mysql.connector

#
    "resource": "/c:/Users/iorn/databaser.py",
    "owner": "python",
    "code": {
        "value": "reportMissingImports",
        "target": {
            "$mid": 1,
            "path": "/microsoft/pyright/blob/main/docs/configuration.md",
            "scheme": "https",
            "authority": "github.com",
            "fragment": "reportMissingImports"
        }
    },
    "severity": 4,
    "message": "Import \"mysql.connector\" could not be resolved",
    "source": "Pylance",
    "startLineNumber": 7,
    "startColumn": 8,
    "endLineNumber": 7,
    "endColumn": 23
}]
vast kestrel
candid fern
#

Yes

vast kestrel
# candid fern Yes it's still won't work

If you are still getting that same import error after installing that package, check your environment's Python config, because it's not seeing the right packages. Double-check how the Python 'profile' etc is set up.

candid fern
#

I had to install the connector separately from mysql

junior rampart
#

I'm making a nice wrapper around tkinter. What's the lowest python version I should try supporting? 3.7?

#

Probably every 3.x that isn't EOL

#

so 3.9 as of today

astral spindle
#

are you sure about this

oak dock
#

I am having the hardest time. I've scoured docs and used several resources online, but I can't figure out how to add a light blue background to tabs in my gui. How are we supposed to make this look good?

vale temple
#

took a year in a half to write all this

#

glad for the progress

royal cape
# oak dock I am having the hardest time. I've scoured docs and used several resources onlin...

ttk widgets are more difficult to style, and at least on windows, several appearance options have no effect, but at least for widgets that support it, you can configure the root style with a background for all of them at once: ```py
from tkinter import Tk
from tkinter.ttk import Style

app = Tk()
style = Style(app)
style.configure(".", background="azure")
... ``` example: https://paste.pythondiscord.com/7LVQ

royal cape
#

hmm, apparently you can also manipulate the layout of the treeview to replace its background element, but it seems somewhat annoying to do that manually

celest python
shell crystal
celest python
#

yeah it looks like an electron app

fleet otter
#

i would like a user interface that populates the entire wall in my room please 😌

vast kestrel
#

Little projectors are super cheap now, and way better than they should be

fleet otter
shell crystal
#

Working on a music player, does the UI look decent so far?

#

feel free to suggest things

chilly escarp
buoyant fulcrum
#

Have you got a scroll bar?

#

Or does the page/list scroll?

shell crystal
#

I might make a system for that

wispy breach
#

great for styling

buoyant fulcrum
#

I really need to learn that

#

I use regular tkinter for quick and easy GUI’d but custom would just make my work look so much nicer

candid fern
#

I have a problem with this label

candid fern
#

Am I having a problem with this frame label even though it's just a normal label within the frame I'm following the video I typed the with the modification of it being smaller

vast kestrel
#

Man why didn't anybody tell me about asciimatics, this seems neat.

merry compass
hard lintel
#

need to create a cli using click module in pyhon

#

object is to create a automl pipline that will preprocess the data with help of ai

south token
#

My first app :

#

this application coded with tkinter

#

please give me your opinion or the review in the application

#

I am fourteen (14) years old

#

I am from Morocco ❤❤❤❤❤

fleet hollow
# south token My first app :

hi; I've deleted your messages containing links to exe files, since we can't validate the safety of those;
next time, consider sending a GitHub (or alternative) link to source instead
(also please don't spam the same text across random channels)

hazy breach
shell crystal
#

but thanks

amber agate
crystal violet
amber agate
clear willow
#

so i want to make a fuction that allow you to change the canvas size and i need help to make it work

c_width = 900
c_height = 500

window.title('draiwing app')
window.geometry("%dx%d" % (width, height))
window.minsize(m_width, m_height)

canvas = Canvas(window, width=c_width, height=c_height, bg='white')
canvas.pack()

def change_canvas_size():
    global c_height, c_width, entry, entry2

    c_height = int(entry.get())

def canvas_size():
    global c_height, c_width, entry, entry2

    Size_window = Toplevel(window)
    Size_window.title('canvas size')
    Size_window.geometry('400x100')

    entry = Entry(Size_window, width=10)
    entry.pack()

    entry2 = Entry(Size_window, width=10)
    entry2.pack()

    button = Button(Size_window, text="button", width=10, command=change_canvas_size)
    button.pack()
wise path
#

!cleanban 1137082364628058193 "3 days" Asking for jobs and direct copy/pasting from ChatGPT are not allowed.

proven basinBOT
#

:incoming_envelope: :ok_hand: applied ban to @woeful mason until <t:1745692249:f> (3 days).

gleaming quail
# clear willow so i want to make a fuction that allow you to change the canvas size and i need ...
def change_canvas_size():
    global c_height, c_width # no need for global entry or entry2 here
    
    try:
        # Update canvas width and height from entry fields
        c_width = int(entry.get())
    except ValueError:
        # Handle invalid input (non-integer values)
        print(f"Invalid width was entered defaulting to current c_width: {c_width}.")

    try:
        c_height = int(entry2.get())
        print("c_height:",c_height,"\nc_width:",c_width)
    except ValueError:
        # Handle invalid input (non-integer values)
        print(f"Invalid height was entered defaulting to current c_height: {c_height}.")

    # Resize the canvas
    canvas.config(width=c_width, height=c_height)



def canvas_size():
    global entry, entry2 # no need for global c_height or c_width here

    Size_window = Toplevel(window)
    Size_window.title('canvas size')
    Size_window.geometry('400x100')

    entry = Entry(Size_window, width=10)
    entry.pack()

    entry2 = Entry(Size_window, width=10)
    entry2.pack()

    button = Button(Size_window, text="button", width=10, command=change_canvas_size)
    button.pack()
clear willow
#

it work

#

thanks a lot for your help

edgy echo
#

What is a good way to make css like animations in pyqt6

#

I want em for buttons.

royal gull
brisk crescent
#

I made a custom module for tkinter from boredom```py
from tkinter import *
from q import *

mainWindow(Tk(),PACK_DISPLAY).title("Hello, World!").setDimension(480,360).setPosition([400,200]).s(q(Label(text="I am a text!"))).appendTo(getMainWindow()).s(q(Button(text="Click me!",command=lambda: getMainWindow().children[0].attr("text","My contents have changed!")))).appendTo(getMainWindow()).show()```

glossy burrow
#

So first time using tkinter and I am trying to make dynamic text boxes (purpose being to populate them later much like a spreadsheet) What I am confused about is how one of these methods works but the other does not.

textBoxArray = [dateBox, chargeBox, amountBox, tagBox, noteBox]

# This loop creates them correctly
i = 0
while 0 <= i < len(textBoxArray):
    textBoxArray[i].grid(column=i+1, row=1, sticky=N, padx=5)
    print(i)
    i = i +1

# This loop dumps them on top of each other
for boxes in textBoxArray:
    gridOffset = 1
    boxes.grid(column=gridOffset, row =1, sticky=N, padx=5)
    gridOffset = gridOffset + 1```
vast kestrel
#

You're assigning gridOffset = 1 inside the loop, not before it

#

You may enjoy enumerate here with a starting index of 1

glossy burrow
#

hmm ok I need to not try and do classes with this first real attempt lol. just overcomplicating it for myself. But it is functionally getting there

candid fern
#

How can I create a closeble tab similar to this

glossy burrow
candid fern
#

TKinter

boreal pier
candid fern
#

?

candid fern
silent bramble
#

cuz who tf uses camelCase in python Pain

glossy burrow
#

I made a class to basically create 5 text boxes dynamically. So when I import csv data it will create how ever many rows of them it needs.
The reason for this is I'll be doing a db on the backend(which I already have Im just building a GUI from the ground up, previously CLI only).

#

The class:

class TextBoxBuilder:
    # original test moved to TextBoxBuilder_test.py
    instance_count = 0

    def __init__(self, mainframe):
        self.mainframe = mainframe
        TextBoxBuilder.instance_count += 1

    def createTextBoxRow(self, expenses):
        # print(dir(self.mainframe))
        print(expenses)
        # self.mainframe = mainframe
        dateBox = Text(self.mainframe, width=12, height=1)
        chargeBox = Text(self.mainframe, width=30, height=1)
        amountBox = Text(self.mainframe, width=5, height=1)
        tagBox = Text(self.mainframe, width=15, height=1)
        noteBox = Text(self.mainframe, width=60, height=1)

        textBoxArray = [dateBox, chargeBox, amountBox, tagBox, noteBox]

        i = 0
        while 0 <= i < len(textBoxArray):
            textBoxArray[i].grid(column=i+1, row=self.instance_count, sticky=N, padx=1)
            print(i)
            i = i +1

        self.populateBoxes(expenses, textBoxArray)
    
    def populateBoxes(self, expenses, boxes):
        #this relies on one single entry, need to change its comprehension to handle multiple entries
        date = expenses[0].strip("'")
        charge_name = expenses[1].strip("'").strip()
        charge_amount = expenses[2].strip("'")
        boxes[0].insert("1.0", date)
        boxes[1].insert("1.0", charge_name)
        boxes[2].insert("1.0", charge_amount)
     
def main():
    
    def file_import():
        importfile.set(filedialog.askopenfilename(title="Select Expenses to Import"))

        expenses = parse_imports(importfile.get())
        update_TextBox(expenses)
        if not importfile:
            return
    
    def update_TextBox(expenses):
        displayExpenses = TextBoxBuilder(mainframe)
        displayExpenses.createTextBoxRow(expenses)```
And my questions is if this is a good way to do this as I'll have several views that are like this as well as taking user input etc
glossy burrow
#

I'll add that I know instance count isn't sustainable longer term but it worked as a POC for dynamic row numbers via the class. But that will be easy to handle later but just counting results from queries or imports and get counts from there.

sleek hollow
#

that being said, I'd consider using a different GUI library that actually has proper spreadsheet widgets

#

PySide6 has QTableWidget

glossy burrow
royal cape
glossy burrow
# royal cape FWIW you might also be interested in tksheet if you want to stay with tkinter, i...

ah thanks I will look at that. I did kinda of want to stick with tkinter since I decided to use and learn it. Maybe this library will make this easier. I am going to try and make Entry boxes work as well for the sake of learning. Fundamentally only a small component of all of this is actually csv, the rest will be from db queries which I know is functionally similar though technically different.

royal cape
#

ahh, that sounds fair

glossy burrow
#

Yea to add more information the purpose of this view is basically a check/edit opportunity before data from the csv is put into the database. After which all interaction with the data will be handled via the db. Though I was hoping I could create a module that I could use for any time I needed to display the data in an editable format.

glossy burrow
#

hmm well I guess I have no funcitonal reason I need to stay with tkinter in general. I plan to make a web app version of this anyways maybe ill take a look at pyside6 after all, seems to have more capabilities and a more modern look which would be nice

#

eh screw it, not going to change libraries Ill just try and make tkinter do what I want.

glossy burrow
#

hmm ok I think I need to change the structure from a list to a dictionary of lists so I can more reliably iterate through it

fallow geyser
#

does anyone know any resources for doing async stuff with pyqt6?

#

not using pyside

fallow geyser
#

im trying to use pyside now and can't get it to do async properly

#

QAsyncioEventLoop.create_connection() is not implemented yet

royal gull
#

The usual way I see async stuff done within Qt in Python is with trio (they have an example in the docs). QtAsyncio is currently in technical preview so it's not there yet.

cloud moat
#

Hi, everyone! I'm new to Python and to programming, and kinda want to have an interface because I think it would get me something palpable, a sense of "this is getting done, finally", that just the lines of code do not do for me... That said, which free "GUI maker" do you recommend? Also, if I want to someday sell an app, there's any option to do code and interface entirely free?

fallow geyser
#

I've got the data being collected, just no gui right now

proven basinBOT
idle palm
#
vast kestrel
#

?

wheat ether
# fallow geyser im trying to use pyside now and can't get it to do async properly

Yes, I use async code inside my pyside6 app extensively! I'm using qasync. You can see it in use at https://github.com/m6r-ai/humbug - the entry point that sets things running is here: https://github.com/m6r-ai/humbug/blob/main/src/humbug/__main__.py

GitHub

A GUI-based AI development tool with integrated Metaphor support - m6r-ai/humbug

GitHub

A GUI-based AI development tool with integrated Metaphor support - m6r-ai/humbug

fallow geyser
#

do you use sockets?

#

i think pyside6 async shit the bed once i tried networking

#

(this is a modbus project)

#

this is where im at

wheat ether
# fallow geyser i gave up and did it another way

I'm using aiohttp to make REST requests to AI backends. The AIs all stream their responses back as a series of server-sent events which could run for several minutes, and there could be quite a few such streams running at any one time

fallow geyser
#

i think the issue was i could not use sockets within the qt async thread

#

it was not implemnted apparnetly

wheat ether
#

I've not tried socket-level access but the docs do talk about QTcpSocket and using non-blocking sockets - I've used similar approaches with other network stacks in the past, but not sure how well they work here

fallow geyser
#

yeah im not making qpymodbus

#

i just send the data over a signal

#

seems to work just fine

naive otter
#

Ngl tkinter canvas are hard to draw (especially coordinates system)
Can anyone explain to me??? I

brisk crescent
#

you got a problem with that?

edgy echo
edgy echo
#

Username - admin

#

pass - thebilleradmin

edgy echo
glossy burrow
#

@bronze iron success!

vast kestrel
#

Card transactions still have the WORST metadata/formatting, it's amazing to me circa 2025

candid fern
#

How what would you recommend for hey out of the way interface that uses mysql?

vast kestrel
#

What does "hey out of the way" mean here exactly?

#

You mean like an existing UI for MySQL?

candid fern
#

Yes sorry it's currently 10:28 pm for me

#

I'm very tired but my ADHD is reminding me of everything

vast kestrel
#

I've still never really been as productive in anything again as I was in TOAD for Oracle 🫗

glossy burrow
#

developing a good importer for these formats is going to take much longer and so simplifying it to CSV for now was the only way to keep moving forward laughing_dragon

modest dove
#

Any other cool ways to do UI in terminal?

dire barn
proven basinBOT
#

badass terminal graphics library

Released on <t:1740720984:D>.

modest dove
quick nimbus
#

anyone know how to make the custom title bars w rounded corners and icons as the X etc?

mild haven
candid fern
#

I work hard today

candid fern
#

I'm the same one know how to use the function for a radio buttons

#

This is why I have so far I wanted to make it smaller but having it fell on the x-aix

glossy burrow
# candid fern

not quite sure what you are asking but it sounds like you want the two radio buttons closer together? Can you provide the code for them so we can analyze it. without seeing the code we cant really help

glossy burrow
tulip edge
#

Anyone here know urwid?

glossy burrow
tulip edge
glossy burrow
tulip edge
#

Yeah Ive spent a bunch of time looking at the docs. Its a conceptual thing, I think. Like I want to start super basic, and create an empty box, and I cant figure it out.

modest dove
modest dove
# tulip edge No.

I've had some issues with documentation before. Maybe try to use Grok's Deepsearch function, has helped me before

tulip edge
#

Someone suggested another tool, Textual. Im going to look at that.

candid fern
#

Do you think I need to change from grid to place to get radio buttons closer to each other

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @quartz hound until <t:1746841062:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).

The <@&831776746206265384> have been alerted for review.

inland portal
grand olive
#

Im going to make an interface IDE like thing for python and call it TkinterFace

#

anyone wanna help me out

pliant dagger
#

i work for this like 2 weeks

zealous thistle
#

i want to create a app for pc, something that is flexabile and has lots of customabilty to design and im not sure what langauge, anyone got any ideas (not python)

glossy burrow
glossy burrow
feral spire
#

I'm making a pyqt app for a node-based editor (which will be made into a plugin for another Qt application). I have a problem where the node's input widgets within a QGraphicItem don't get updated/repainted when interacted with (i.e. QLineEdit widgets don't show the cursor, nor what is being typed). The widgets get updated when I click away from the node, then select it again; or when interacting with a QComboBox, for some reason that works just fine).

#

This is my class which contains the widgets:

from PyQt5.QtWidgets import QWidget, QVBoxLayout
from PyQt5.QtGui import QColor

from QpnSettings import QpnSettings

class QpnNodeContentWidget(QWidget):
    def __init__(self, parent=None):
        super().__init__(parent)
        self.layout = QVBoxLayout()
        self.layout.setContentsMargins(0, 0, 0, 0)
        self.layout.setSpacing(0)
        self.setLayout(self.layout)
        palette = self.palette()
        palette.setColor(self.backgroundRole(), QColor(QpnSettings.NodeContentBackgroundColor))
        self.setPalette(palette)
        self._count = 0
        self.setFixedSize(0, 0)
    
    def AddWidget(self, widget: QWidget, newWidth: int):
        widget.setUpdatesEnabled(True)
        self.layout.addWidget(widget)
        self.setFixedSize(int(newWidth), int(self.height() + widget.sizeHint().height()))
        self._count += 1
        return self.height() - (widget.sizeHint().height()/2)

feral spire
#

Well, I found a solution, but it's probably not the best solution. Doing this, absolutely slams a CPU core to 100% (but it fixes the issue). This is the node class which holds the proxy widget for the node content widgets. I added a line in the graphic items's paint() function to update the widget proxy.

class QpnNode(QGraphicsItem):
    def __init__(self, title="Undefined Node", parent=None):
        super().__init__(parent)
        self._title = title
        self.inputs = []
        self.outputs = []
        self.inputWidgets = []
        
        # UI Elements
        self._titleBar = QGraphicsSimpleTextItem(self._title)
        self._nodeContent = QpnNodeContentWidget()
        self._nodeContentProxy = QGraphicsProxyWidget(self)
        self._nodeContentProxy.setWidget(self._nodeContent)

        self.InitUI()

    def paint(self, painter: QPainter, option: QStyleOptionGraphicsItem, widget=None):
        # Node paint code hidden for brevity
        ...
        # Force update the content widgets
        self._nodeContentProxy.update()

There's gotta be a better way to do this.

digital rose
#

Guys

#

I am working on an interesting open source project, back-end is almost done, but I was hoping if anyone would like to contribute to build the ui

#

I hate designing

wheat ether
# feral spire Well, I found a solution, but it's probably not the best solution. Doing this, a...

without knowing what your proxy widget does, is the 100% load problem that in updating the proxy you also retrigger the paint? I've had that sort of thing happen in the past. Your original problem sounds like there's probably one or more events you need to listen to and that may need you to and that need to trigger some form of update that will in turn repaint your widget? I had a few weird problems that sound similar to what you've described a few months ago when I built a terminal emulator widget but found I wasn't updating a viewport correctly sometimes

glossy burrow
feral spire
frank linden
#

Hi Guys, I’m a Product Designer with 5 years of experience and a strong passion for solving real-world problems through thoughtful, intuitive design, whether it’s helping users interact with immersive XR environments, navigate complex government systems, or engage with AI tools that enhance daily life. I’m excited to bring my skills to a team where design drives impact and innovation.
Let's connect and discuss your project..

proven basinBOT
#

9. Do not offer or ask for paid work of any kind.

feral spire
glossy burrow
digital rose
digital rose
glossy burrow
#

they arent but its not like there is some simple way of auto deleting bots. especially when they dont post certain things like forbidden urls, etc

digital rose
#

Oo

glossy burrow
digital rose
#

Thx for advice

candid fern
#

Do I need to use a button to key behind information?

digital rose
#

What all I can add to make it better?

#

Any idea in mind ?

candid fern
digital rose
#

🥲 hard to explain back

#

It helps user to convert lectures video into notes

#

So the youtube button, opens youtube within it

#

And notes button open notes

#

(in very short)

candid fern
#

How about a timer and a point system

candid fern
# digital rose 🥲 hard to explain back

I'm sorry that I didn't understand it at first but maybe something underneath just so people who don't use a pad in paper and then average or an area lines when they're not on the computer can understand and if you put an appoint system and assign points to if it's the video is a lecture and you spend time on it instead of having them be able to open YouTube and then do whatever you were paying retention because people don't want people points to be going down and what if you added a quiz button that quiz you on the lecture that you're currently doing you know you paste in the URL and it generates a quiz and it giving you points that can be used to make their notes Fancy ect

digital rose
#

Thats a Great idea

#

But I thought copy pasting url might break the momentum, won't it look like an extra burden like external

#

Extra task

#

Btw it has the quiz things

candid fern
#

I know it might seem odd to have him paste in then you are out but think about it so that they don't have to look for the same video 100 times by using the same keywords and it popping up different it just seems people time in essence

candid fern
lofty pond
# digital rose

Is there hover effects? I think it be a nice addition to add a on hover to show the title of the buttons and cool animations :O

candid fern
#

!e```py
Geometry_1 ("!x!")
Geometry_2("?x?")

Root.geometry(Geometry_1)

If con_1 == "" and con_2 =="" :
Root.geometry(Geometry_1)
Is this how I can change the screen size in my programs

dire barn
#

No ads, please.

candid fern
#

Is it possible to change the geometry using an if statement

digital rose
#

Which gui library u are using

#

I changed the geometry of the main window with the press of the button

#

(looka like u are using tk ?)

languid pollen
digital rose
#

Like video lecture into detailed notes

#

Gives you flashcards

#

Quiz

languid pollen
#

oh damn nice

digital rose
#

you can always cross question

digital rose
languid pollen
#

what are you using

#

electron?

#

i mean for the ui

worn marten
#

Say im making a songwriting app in swiftui

#

How would ygs go abt designing it

glossy burrow
candid fern
digital rose
#

Pyside6

proven basinBOT
#

:incoming_envelope: :ok_hand: applied timeout to @light vigil until <t:1747429107:f> (10 minutes) (reason: newlines spam - sent 125 newlines).

The <@&831776746206265384> have been alerted for review.

light vigil
#

it looks like it's being covered up, but I thought the whole point of a grid layout was that the widget in column 0 wouldn't cover the widget in column 1

light vigil
#

I got it to work by changing the master of the widgets in ScrollableFileList to None, though I don't know why that works. It was just something I found after hours of searching the internet.

#

also, by doing this the position of the individual components in ScrollableFileList belong to, and are placed in the grid of the root window, which doesn't seem to me like it's in the spirit of grouping widgets together into custom ones.

royal cape
# light vigil I got it to work by changing the master of the widgets in ScrollableFileList to ...

master=None just means to use the root widget as the parent, that being Tk(), but your original code was on the right track - i believe the issue was on line 29, you forgot to pass the parent widget to the Listbox superclass, so it became a child of the root widget and not ScrollableFileList, then by calling file_list.grid(row=0, column=0, ...) with the same grid coordinates as the scrollable file list, the listbox completely drew over your frame and obscured it

#

you can tell by setting sticky="W" on just the file_list, it draws the listbox on the side and you can see that the scrollbar was hiding under it

#

and just adding super().__init__(master, ...) in your FileList class fixes your code snippet:

normal dust
#

I made a prototype game i tkinter and someone suggested to convert it into pyside6 but I've never used pyside6 before and I'm having problem converting it into pyside6 do you guys think it's worth it to convert into pyside6?

modest dove
normal dust
#

i talked about this on #game-development and someone recommended I talk about this in userinterface

#

nevermind I don't think you're talking to me

modest dove
normal dust
#

cute penguin

modest dove
#

Appreciate it

sleek hollow
normal dust
#

so I haven't came up with a lot of features yet but I will and it possible that some things I want to do I won't be able to do in tkinter but i could just come up with something else that works with tkinter

#

it's also just nicer to have a more up to date version

sleek hollow
#

What you have so far wouldn't be too hard to recreate in PySide with a bit of know-how

light vault
#

Has anyone tried to use the native asyncio support in PyGObject lately?

#

Basically importing the GLibEventLoopPolicy class from gi.events??

#

Asking because I can't just make that import

#

Despite having the latest version of PyGObject installed

digital rose
#

I have a issue up here

#

I have a markdown text

#

I want to render it

#

I am using pyside6

#

Can anyone help me out in how to render the markdown text format

royal gull
digital rose
#

My text output response comes out as stream, just like chatgpt, so when I used this it was only showing single letter at a time

candid fern
#

How do I make it so as soon as the text something in the interface it changes the geometry of the room and then replaces everything on the widget

candid fern
#

!e```py
Geometry_1 ("200x200")
Geometry_2("400x400")

Root.geometry(Geometry_1)

con_1 = 'x'
Con_2= 1

If con_1 == "x" and con_2 =="1" :Root.geometry(Geometry_1)

proven basinBOT
candid fern
#

!e```py
Geometry_1 ("200x200")
Geometry_2("400x400")

Root.geometry(Geometry_1)

con_1 = 'x'
Con_2= 1

If con_1 == "x" and con_2 =="1" :Root.geometry(Geometry_1)

proven basinBOT
wheat ether
# digital rose My text output response comes out as stream, just like chatgpt, so when I used t...

I've literally just been building something that sounds very similar to this - something that takes AI streams and renders the markdown from the chat conversation into a QTextEdit. There are couple of minor things not yet supported (blockquotes being the main one). The project is open source so if helpful you can read through the markdown parser and the markdown renderer - https://github.com/m6r-ai/humbug

GitHub

A GUI-based AI development tool with integrated Metaphor support - m6r-ai/humbug

digital rose
digital rose
#

Btw I figured out using markdown library and bs4

neat fog
#

(in pyside6) is there a way to set a the font of 12 QLabels without having to do it for each one (I want to avoid: 12 Lines of code setting the font for each one)?

digital rose
#

Yes mate

#

There are two ways

#

You can loop through the list

#

Or set-up custom stylesheet

#
from PySide6.QtWidgets import QLabel, QApplication, QWidget, QVBoxLayout
from PySide6.QtGui import QFont

app = QApplication([])

window = QWidget()
layout = QVBoxLayout(window)

# Create labels and store them in a list
labels = [QLabel(f"Label {i+1}") for i in range(12)]

# Set a common font
common_font = QFont("Arial", 14)

# Apply the font in a loop
for label in labels:
    label.setFont(common_font)
    layout.addWidget(label)

window.show()
app.exec()

#

Or you can directly setup the stylesheet

neat fog
#

Ok thanks

digital rose
neat fog
#

I haven't implemented it yet,

restive barn
#

hii!! is it better to use pyqt6 to just stick to pyqt5? for gui apps

wheat ether
royal gull
#

Difference also shouldn't be too drastic, apart from some deprecations and rearrangements, but the code should remain mostly the same.

candid fern
#
# import
import time
import random
import datetime
from lists import *
from tkinter import *
import mysql.connector
from tkinter import ttk 
from tkinter import messagebox



class registration_sys():
    def __init__(self,root):

        self.root = root #sets up main window

        self.root.title("log in")

        self.root.geometry(log_in_geometry)

        # user log in
        UserName_entry  = ttk.Entry(self.root,
                                  font= standerd_font,
                                width=20)

        Password_entry = ttk.Entry(self.root,
                                  font= standerd_font,
                                width=20)
        
    
        UserName = UserName_entry.get()
        Password = Password_entry.get()
        
        # entry boxes
        UserName_entry.place(x=100,
                             y=270)
        
        Password_entry.place(x=100,
                             y=320)
        
        #button
        sign_in_button = Button(root,
                                font= standerd_font,
                                text="sign in")
        
        sign_in_button.place(x=159,
                             y=390)

#window sizes
        if UserName == "silvercross" and  Password == "17":
            print("jj")



root = Tk()
ob = registration_sys(root)
root.mainloop()```
glossy burrow
#

Anyone else find the tkinter documentation pretty painful to read? -_-

royal cape
glossy burrow
royal cape
#

ah, i think their API reference isn't great for learning since it lacks any form of tutorials/guides, but it's at least a decent reference and has some useful explanations scattered around there (e.g. pack -> the packer algorithm)

glossy burrow
#

like trying to do combo boxes just now and for one the tutorial image shows like 5x what the 'sample code' is so there is just no explanation there nor is there a coerrelary between that page and the full docs.

austere trout
#

ttkbootstrap

#

considering adding dark mode but uhhhh

#

hellll naw

tacit cape
#

please how to correct this problem

glossy burrow
proven basinBOT
#
Pasting large amounts of code

If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

glossy burrow
#

post code and errors as text not screenshots.

tacit cape
proven basinBOT
tacit cape
#

the erreur is ichiers sélectionnés : ['C:/Users/p131242/OneDrive - Alliance/Outils_MTM/MTM_Dev/Code_MTM/All_Acquis/27_11_2024_Flexivan_SV159_91X7_Test2_Part15_UC60.dat']
📥 Chargement : C:/Users/p131242/OneDrive - Alliance/Outils_MTM/MTM_Dev/Code_MTM/All_Acquis/27_11_2024_Flexivan_SV159_91X7_Test2_Part15_UC60.dat
collecting_data: 0.94s
metadata_extraction: 0.00s
🚨 Erreur dans test2 : The future belongs to a different loop than the one specified as the loop argument

glossy burrow
glossy burrow
tacit cape
#

📥 Chargement : C:/Users/p131242/OneDrive - Alliance/Outils_MTM/MTM_Dev/Code_MTM/All_Acquis/27_11_2024_Flexivan_SV159_91X7_Test2_Part15_UC60.dat
collecting_data: 0.91s
metadata_extraction: 0.00s
🚨 Erreur dans test2 : The future belongs to a different loop than the one specified as the loop argument

austere trout
#

bug fixing!

glossy burrow
# austere trout

much more readable, and the amount of pirated games increased a good bit ;D

austere trout
#

I added a robocopy feature

#

where u can mirror drives

#

and I forgot to add like 4 step verification

#

so I managed to mirror my D drive to my C drive

#

my 2 tb ssd to my 1tb ssd in other words

austere trout
#

that’s how that went

#

I managed to save everything and quit it before it took my whole system but it managed to delete all my steamfiles and put them somewhere random

#

and some other files

#

so im not sure what it fucked up

#

so I took all my save files and the project and reset the pc

#

I was practicing very bad programming

#

that’s like fucking with the electrical grid but not turning off the power

#

oh well

#

It’s been half a year

#

it was time for a reset anyways

glossy burrow
#

"teaching moment" as they are called

austere trout
#

Should be fun

glossy burrow
#

indeed, recently upgraded to win11 so I feel that

austere trout
glossy burrow
#

well microsoft's version of 'upgrade'

#

Where technically we didnt 'delete' anything, but still broke over 70% of your apps

austere trout
austere trout
glossy burrow
#

that is lucky, otherwise you probably would have just hard crashed and not been able to stop it

austere trout
#

so it all just transferred over to that but then something must’ve messed up alobg the way

austere trout
#

robocopy is dangerous business

glossy burrow
#

yup, that aisde I really like your ui though. impressed its Tkinter personally. Been having a lot of headaches with it myself lately, mostly documentation related

austere trout
#

I was struggling myself

#

its surprisingly good with ui