Taking a screenshot from a pyqt script by selecting the area [closed] - python

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
How do I take a screenshot in PyQt?
I found QRubberBand Class, however I am unsure of how to do that in PyQt.

QtGui.QPixmap will do the trick for you, use it's grabWindow() method like this:
pixmap = QPixmap.grabWindow(QApplication.desktop().winId())
This will tak a screenshot of current desktop.
Now you can use QRubberband to select a specific area on the pixmap and use QPixmap.copy() to copy that selected area as another pixmap and finally use QPixmap.save() to save the selected area.
For more information look through Qt documentation here

Related

I'm looking for a way to create a GUI with Python where a user can add nodes and connect them? Also showing some info about the nodes [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 12 months ago.
This post was edited and submitted for review 12 months ago and failed to reopen the post:
Original close reason(s) were not resolved
Improve this question
I want the network to be interactive (ie. showing info on a node when hovered on). I tried networkx,pyvis, and graphviz but I'm not sure how they can work on a gui as they just output a graph depending on the inputs. I also know about Tkinter for the gui but it's not enough to create interactive network.
I think you should use PyQt5.
PyQt5 is a Python binding for the Qt cross-platform application and UI framework. It's a complete binding, offering access to all classes, functions and signals of the Qt library.

Can I fake a video stream in Zoom (or fake it using packets so as to work universally)? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
Currently, I have yet to find anything online using Google. However, what I'm trying to do is to take a pre recorded photo or video, and intercept my camera's capture. Similar effect to holding up a printed photo to a camera. Also similar to spy-type movies like James Bond/007, or like in the first National Treasure. I would prefer to use python, however, I do understand the basics of Java and C++. This is mainly for Google Meet and Zoom. I prefer to directly manipulate the camera.
I'm not sure how to solve this with programming, I did however find this article about fake attending a Zoom meeting using a pre-recorded video and play it as the virtual background. Maybe it will help you.
Link to Article: https://gadgetstouse.com/blog/2020/05/11/fake-attend-boring-zoom-meeting/

How can I put the messages from my bot in black boxes on Discord? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
I want my bot to output the text of normal commands in black boxes like in this help command:
Right now, this is my output:
Those are code blocks, and as CDJB linked, you can find the markdown for them at https://support.discordapp.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline-.

python - how to make autocomplete gui? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I searched so much but I couldn't find what I should use so I tried to use the built-in Tkinter but I can't find how to make what I want to make with it.
I want to have a text entry where user types something and my program makes some dynamic suggestions by opening a dropdown menu and user can choose the top option by pressing enter or they can click on one of the options or use up/down keys. and then that option will be added to a large text box under that single line textbox.
Can you recommend me any toolkit for python that I can make this GUI with? Also a link to a good tutorial for that toolkit would be much appreciated bc I'm new to python GUI.
Actually since this is very useful I'm sure there must be some snippet out there that would do this! But I can't find it yet!
Sorry if my question is a little too broad. But I'm so exhausted from searching to no avail. So I thought maybe some experienced people can easily help me out.
You can check out this module, which does exactly what you want (disclaimer: I am the author of that code).
Specifically, the code is not a tkinter.Entry widget, but a 'wrapper' (tk.Frame) around a tkinter.Entry and a tkinter.Listbox widget, the latter of which displays the results in an ordered list. If you want to redesign this behaviour yourself, I highly recommend using a similar approach rather than packing one widget below the other.
According to this link you have a lot of choices.
PyGTK
PyQt
wxPython

Is there a description of all available wxPython Widgets? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I'm using wxPython, (with python 2.7) and am curious as to anyone have provided a sort of guide or an overview over available widgets? When I say a widget I imply a graphical entity drawn on the screen.
I have seen the documentation of the API, and by assuming that all "widgets" are sublasses to wx.Window, a better overview can be found in "tree-view in the aforementioned documentation.
However, if I did not know beforehand (from a tutorial) what a "notebook" was (in the wx sense), it would have been hard to be inspired to use this widget, using only the API reference.
The freely available book "wxPython in action" shows some examples here and there, but does not either contain an overview.
Does a better, more graphical, overview or presentation exist? Not necessarily of all possible widgets, but at least the most popular?
The Phoenix documentation has screenshots of a lot of the widgets:
docs.wxpython.org/gallery.html
You should also download the wxPython demo. It shows nearly all the widgets and how to use them. It can be found at http://www.wxpython.org

Categories