I have seperate two pyqt5 window. One of them open in screen 1 and another open in second 2 display in my computer.
When I open the both of them, I want to keep mouse click in window2 and it has LineEdit. I need to focus every time in window2. I am using setFocus function but it didnt work. When the use click in window1 I lost the focus on window2 how can I move mouse cursor every time in related QlineEdit ?
Related
using tkinter, can somebody please give me some advice about to center all the actions in my actual window?
in other words, I have a window that have to be closed before the system recognize the mouse click in any other part of the display out of the window. Let's see I have three windows in cascade, Window1, Window2 and window3,
in window1 you have a button that opens a smaller window2, and in this window2 you have a similar button to open an even smaller window3; window3 has the same button to close than the others two windows.
if I click this button the windows will destroy itself, obviously but, if I click the mouse out of the window3, the "window3" goes behind window2, and what I want is to destroy window3 or to force every action with the mouse inside window3
I'm not a professional in python/tkinter only someone who is working in a project,
I used the following code to create an OpenCV window with a back button:
cv2.namedWindow("Edit")
cv2.createButton('Back',self.back,None,cv2.QT_PUSH_BUTTON,1)
However, when this window is opened, the button does not appear until I click command+P on my Mac. Is there a way I can program the menubar to appear without requiring the user to click command+P every time?
I want to make a click through window. A window which I click but the click pass to the window below it.
I've found this two solutions for windows:
How to make click-through windows PyQt
I have a form that can "click through", i.e. direct clicks to the window below. How can I undo my changes after the event?
But I want it to work in linux. I study the xlib mechanisms but cannot understand how the window stack works. Actually I can get all the windows with XQueryTree() and found the ones under my window. But I don't know witch one are above.
im having some problems to send to the front a GTK window.
I have a main window (window_root) with a button that launches another window (window_programs).
with this commands:
window_root.hide()
window_programs.show()
then, in window_programs, i have a button that displays another window (window_list) with the command:
window_list.show()
window_list is modal.
The problem was that window_list appeared at the back of window_programs.
so i did some research and i found window_list.show().
The problems is that window_list appears at the front, but when i click it window_programs comes to the front!
it makes some time that i'm looking for the solution, any help will be appreciated!
You are looking for the transient-for property of the modal window (which should be available in Glade). If the modal window needs to be transient to either of the two other windows, then you need to use gtk_window_set_transient_for() as needed since the modal can only be transient for one window at a time.
I made a music player, Once the main frame is iconized another frame appears and once that frame is iconized a smaller frame appears. Is there a way to get the last, small frame, to always be on the screen? now if I click outside of the frame it disappears until I click on it in the taskbar. I want it to always be on screen until the user clicks a button to open up the frame before the final, small frame.
To make the dialog stay in the foreground until the user interacts with it use the ShowModal() method:
There are two types of dialogs. Modal and modeless. Modal dialog does
not allow a user to work with the rest of the application until it is
destroyed. Modal dialogs are created with the ShowModal() method.
Dialogs are modeless when called with Show().
http://wiki.wxpython.org/AnotherTutorial/
If you just want the window to stay in the foreground, you can use the setFocus() method on the dialog because it is a child of the Window class:
SetFocus(self)
Set's the focus to this window, allowing it to receive keyboard input.
http://wxpython.org/docs/api/wx.Window-class.html#SetFocus