How to make GUI in another application with python? - python

For exampe, there is a game called Hearthstone, and this is how it looks normaly:
Normal Hearthstone
But you can download a deck tracker tool like this one, and it will add more UI right in the game window:
Deck tracker
How should I approach a project like that, if I want to add some text, for example, to another application? Preferably in python. Any library recomendations?
I've looked into Tkinter and other GUI libraries, but they focus on making your own window applications, not adding to the existing one.

Related

How can I make QStandardItems in a QTreeView work like buttons opening a new window (submenu)?

I am fairly new to PyQt5 or rather to Qt in general, so sorry if this question is really dumb or basic.
I am assigned working on an application for some rather complex scientific data analysis that uses PyQt5. Now my current task is to create an interface to enter all kinds of parameters in a treelike structure. I use a class TreeView(QWidget) for this purpose, loosely following this guide: http://pharma-sas.com/common-manipulation-of-qtreeview-using-pyqt5/
Now my boss wants that for some of the items in the tree it should be possible to click them just like a QPushButton to open a submenu, in which one can enter some more parameters (could be a QTableView I guess). As far as I know it is not possible to append QPushButtons just like QStandardItems right?
So what would be the best way to do this? Is it even possible?

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.

How to implement a toolstrip to my GUI?

I am creating a simple application to manage unknown words when learning a new language. The application is written in Python and I am using Tkinter to build the GUI.
As you can see, I am almost done - all I need is a toolstrip with several buttons on it, but it seems that there is no toolstrip widget in Tkinter. How can I overcome the issue?
There is no toolstrip widget when it comes to Tkinter.
You have three options:
1) If you want to continue building your application using Tkinter, you could create a frame at the top of your GUI and add some buttons into it, which would act as an alternative to a toolstrip.
2) You can design your own widget using Tcl, which is definitely a lot of effort for a beginner.
3) You can start from scratch by switching to PyQt which has QToolBar and QMenuBar (depending on whether you want icons or text as buttons in the toolstrip).

Creating a multi-screen application using Qt Designer

I'm using Qt Designer to create UI designs which I'm then converting into python code. Since I'm quite new to Qt I'd like to ask: is there a way I could implement a multi-screen application? I.e. having a next button clicked and getting a new set of options/widgets etc within the same window.
To be honest, I was developing using Kivy, and as slick as that is (especially with multiple screens) it depends on PyGame, which proves to be an enormous portability headache, so I had to switch to something else, and PyQt was the next feasible option (or so it seems).
It's called a QWizard. It is not called a multi screen application, but if you search for wizard instead, you find lots of information.
Links
Example with C++ code
[PyQt QWizard documentation] http://pyqt.sourceforge.net/Docs/PyQt4/qwizard.html

where is the button widget in pyglet ?

i'm checking out pyglet, but, funny enough, i can't find how to do a simple button!
so
what is the standard way to create a standard button?
is there a standard way to create a Message-Box? open/save dialogs?
or am i missing the point of pyglet? isn't it yet-another gui toolkit
for creating (also) forms, windows, buttons, texts, standard widgets, etc. ?
i'm using Python 2.x on a windows PC if that matters.
I didn't use Pyglet yet, but is not a GUI library, it doesn't have to have widgets like buttons, or containers etc. It's a multimedia library like Pygame, it draws stuff on screen, plays sounds, and has some helper functions.
If you want to draw a button on screen, you should first draw a rectangle, print some text in it, and then listen mouse clicks to know if it's clicked on this rectangle.
See PyQT, PyGTK, WxPython for some examples of GUI libraries.
You can see an example of how to create a button and create yet another interface with Pyglet in the script:
http://www.pyglet.org/doc/programming_guide/media_player.py
But this is only an example interface created without complex items.
Current state of affairs 3 years later...
As previously stated Pyglet itself generally provides a lower level api than the UI widget library (e.g. closer to GDI or SDL).
That said there are gui's built on top of pyglet:
https://github.com/jorgecarleitao/pyglet-gui
https://code.google.com/p/kytten/
Also pyglet 1.2 now has buttons itself (though not much else as far as widgets are concerned).

Categories