I can't understand the grid system PyQt5 - python

I need to create some program that will calculate some thermodynamics properties. I write on macos, python 3 because python has the necessary library.
So i have the problem with GUI. I learn and try to create simple grid for my application, but the actual behavior of the elements is very different from the one conceived (or doesn't work). I don't understand how to create right grid for my app. When i studied bootstrap, i needed one evening for understanding, and after that i could to create grid very easy, but here is hell.
Please help me. I want to understand how i need to create right grid system for my app
my Application layout:

Related

Application for windows and mac using python

I'm in a dilemma. I've got a python code that works for each of the yellow squares shown below but I want to make an application that looks like below and uses the information from the first text box and the second drag and drop box. Then depending on what the user clicked on, the code for that would run. I'm not sure how to approach this. Any help would be greatly appreciated!
You can use Python GUI libraries like:
Tkinter
PyQT
WxPython
Kivy
Pyglet
(This list is not exhaustive.)
Each has their own advantages and disadvantages. Choose the one that fits your project the best.
My personal recommendation for your particular project would be Kivy.

Python compile a script within a GUI

I am currently working on the final year project for my degree. I have chosen to research and develop a tool to aid the delivery of the new Computing curriculum that is coming to schools next year.
I am using a Raspberry Pi in my development, and I aim to teach extremely basic Python programming to children between the ages of 8 and 10. They are going to be able to control some hardware attached to the Pi using a simple API that I am going to create.
My question is: I would like to be able to create a GUI for the children to work in, which would allow them to write and compile scripts. This is mainly to get away from the unfamiliar interface of Linux and terminals etc, and put them in a friendly, basic interface which will pretty much just allow them to write their code and click a big red button to compile and run it to interact with the hardware. Is it possible to allow for text to be written in a GUI and then compiled when the button is pressed?
I am pretty new to Python myself so I am not as clued up as I'd like to be about the specifics of it. I know that it is possible to have the output of IDLE inside of a tkinter interface, and that it is possible to have text boxes for user input and stuff, but would it actually be possible to compile a script on button press and then run it? I have been thinking that maybe threading is the answer. Perhaps I could create a new thread to do it when the button is pressed?
My apologies if this is incredibly basic, but I am having no luck finding any answers about how I would do this. I think it's mainly because I am unsure on what exactly to ask for.
I appreciate any feedback/help, thank you very much.
Dell
Have your GUi write the Python code to a file, then dynamically import using the imp module. I actually do something similar :-)
import imp
hest = imp.load_source("Name", Path)

Interacting with 3D objects in Python 3?

I am currently in the planing stage of building an interactive periodic table of the elements program in python 3. It won't be a super advanced program, since I am only a beginner in python 3 (4-5 months of self-training).
Basically, when you click on an element of the periodic table, you will look at its properties in more detail and would have a dynamic 3D view of the an animated atom (with the electrons circling around it) which I would create in Blender. Here is a simple mockup I just made for people who are visual (lots of stuff missing here, but it's only the basic shell).
Ok, so my question is: How can I interact with 3D objects in Python 3? I have searched, and have found that PyGame can handle this, but it seems it's not the best to handle 3D graphics, and I am not sure if PyGame is ideal for this kind of program. Of course, there is vpython, but it doesn't work with Python 3. So how can I manage to do this?
Please keep in mind that I am a beginner, so any resources you think can help me would be of great appreciation!
Thanks to all.
The easiest could be to use images and videos.
But if you want to manipulate 3D, there are PyOpenGL and VPython.
PyOpenGL provides low level interface to display 3D objects.
PyOpenGL can be used with PyQt or PyGame to have a 3D display within a 2D GUI.
Edit: there is also a build of vpython for 32bit python 3.1 on windows

Picking a suitable GUI framework for project

I have a project where I have to show some sort of changing bar graph with results from a function. This bar graph should be in colour and 3d. I want it to look good since it's an open source educational program where it teaches the user about different voting systems and how they effect the outcome of an election. I would like to use python but I have no idea about using GUI frameworks since all my work in python has been command line based. Your help will be appreciated.
For 3D graphics, you might want to use OpenGL with a game framework, such as PyGame or Pyglet. Use matplotlib as TJD suggested in the other answer.
As for GUI frameworks, they generally won't help much with 3D graphics:
PyQt is one choice; I see you already have it in the question tags. PySide is very similar to PyQt, but with a nicer licence.
Then there's tkinter (in the standard library), wxPython, and pyGTK – I hear all of them are good, though I don't know them personally.
Pick one and stay with it. It'll take some time to learn if you're not experienced, so don't expect results too soon.
You might want to look at matplotlib, which is probably the most widely used library for doing graphs, including 3-D.

making a python gui for ffdshow

I was thinking that for a learning project for myself, I would try to make a GUI for ffdshow on linux, using tkinter. Wanted to make sure this project would be feasible first, before I get halfway through and run into something that cant be done in python.
Basic idea is to have a single GUI window with a bunch of drop down boxes that have the various presets (like format or bitrate), as well as a text box where a custom number can be entered if applicable. Then when all the options are selected, the user hits the Start button on the GUI and it shows a progress little bar with a percentage. All the options selected would just send the relevant selections as cli arguments for ffdshow, and begin the conversion progress (essentially turning all the user's input into a single perfect cli command).
Is all this doable with python and tkinter? and is it something that a relative newb with only very basic tkinter experience could pull off with books and other python resources?
Thanks
That is precisely the type of thing that python and Tkinter excel at. And yes, a relative newbie can easily do a task like that.

Categories