Questions tagged [nicegui]

Links

28 questions
4
votes
2 answers

Where and how can I define the primary and secondary colors?

I'm currently testing NiceGUI and it lokks like it will be my favorite GUI framework for Python. I'm an absolute newbie with FastAPI, Vue and Tailwind (I'm coming from PyQT)... I understood that I can style the elements with classes() and use…
Pozilei
  • 61
  • 4
3
votes
0 answers

Send NiceGUI upload to FastAPI using requests

I am trying to create a frontend page with NiceGUI in which I upload a file to a FastAPI backend using requests. I have tried some stuff which I found online, but to no avail Thank you for the help! PS. I am new to coding from client I wrote: def…
3
votes
1 answer

Is there a way to refresh an element on page load with NiceGUI?

I'm trying to build a web app with NiceGUI where the user can upload a file, and then be shown the contents of the file (or a message, any text as a label element really). It works fine, except that when I upload a second file, it keeps the old text…
nopori
  • 76
  • 5
2
votes
1 answer

NiceGUI Interactive Image - Does changing source periodically refreshes/resets the content as well

I am using an interactive image to show live stream video (code from NiceGUI openCV example) I am able to successfully show the live feed using the ui.timer. However, I also do some operations with my mouse over the image like recording mouse…
Shreyesh Desai
  • 569
  • 4
  • 19
2
votes
1 answer

I'm trying to make a spinner visible on clicking a button but it stays invisible. Any way to fix this?

I've initially added invisible class to the spinner. On clicking the button I'm removing the invisible class and adding the visible class to it. But it stays invisible. I'm using the Tailwind CSS and NiceGUI to create the front end. from nicegui…
Kshitiz_sc
  • 45
  • 2
2
votes
1 answer

Is it possible to use widgets in NiceGUI Python?

I recently got acquainted with the NiceGUI library for python and decided to rewrite the Todo List demo in one kind of class. One list works well, when adding a second one there are difficulties: one of the lists may not respond to the fact that I…
dudavik
  • 25
  • 3
2
votes
1 answer

NiceGUI tables : How to use selection and click events

I want to either click or select a single row in a table, retrieve the corresponding row's data, and then process it further with handlers. But the documentation is slim at the moment, and I have never used Quasar or Vue.js before. Here's my…
2
votes
1 answer

Importing Python files based on radio input

I want to import certain files based on input from the user using some sort of selection (I am using a radio button). I am having trouble getting the updated selection from the user to send to check the input and go to the desired page for the…
cjk5642
  • 35
  • 4
2
votes
0 answers

ffmpeg crashed if run as subprocess from nicegui

I need to trigger a long ffmpeg process by nicegui button. I have created a code : from concurrent.futures import ProcessPoolExecutor import shlex, subprocess import argparse import asyncio from nicegui import ui, app def run_cmd(): cmd = "ffmpeg…
user1113159
  • 645
  • 2
  • 7
  • 14
1
vote
1 answer

Problem with percentage width and flex layout in nicegui and tailwindcss

I want to make a flex layout with nicegui. I stumbled over a weird behavior when using percentage sizes. Can anyone please point out, what I did wrong? Here is a minimal example, where I expected the two red boxes to be next to each other. However,…
Dronakuul
  • 147
  • 9
1
vote
0 answers

Is there any way to validate the form / input field in nicegui python?

`with ui.stepper().props('vertical').classes('w-full') as stepper: with ui.step('User Basic Information'): with ui.grid(columns=1): f_name = ui.input(label='First Name',…
unstuck
  • 11
  • 2
1
vote
0 answers

NiceGUI Python tabs

How make tabs in tabs with NiceGUI? from nicegui import ui with ui.tabs().classes('w-full') as tabs: one = ui.tab('One') two = ui.tab('Two') with ui.tab_panels(tabs, value=two).classes('w-full'): with ui.tab_panel(one): …
1
vote
1 answer

Trying to create an app through NiceGUI.I have a button on which an API is called .But API takes time to respond and app loses connection. Any fixes?

I'm creating an app using NiceGUI (Python). I have a button which upon getting clicked makes an API call. However that API takes a lot of time to do the work in the backend and the app loses connection and shows the error as: "Trying to connect.…
Kshitiz_sc
  • 45
  • 2
1
vote
1 answer

I'm populating some cards using for-loop in NiceGUI.Each has a label and a button.Trying to access label id but it prints last label id only on click

When I click on the button it should print the id of the label inside that card only. But it always prints the id of last label no matter which button I click on. In the code below my_grid is the name of the grid in which I'm trying to populate the…
Kshitiz_sc
  • 45
  • 2
1
vote
0 answers

How do I Constantly update a pandas dataframe in NiceGUI?

this is my first time doing any GUI in python so trying out niceGUI also for the first time. I have a pandas dataframe that keeps updating based on certain conditions and im displaying it on NiceGUI using the table method. it displays fine but isn't…
1
2