In my program I am using QtTabWidget in which the user can dynamically add tabs as per their needs. I think that the norm of an "Add Tab (+)" Button is now defined by the way we see it in our web browsers like chrome. Which is why I would like to replicate such a button in my program. Please find an example image of what I want my button to look like.
I have found a few people asking this question but not a solid solution to it yet. An example solution is "https://stackoverflow.com/questions/22616446/add-plus-button-to-tabwidget-pyqt4" however the main problem with this is that the new tab button is a corner widget which appears at the top right hand corner of my screen (see image below). Although I would prefer it to be dynamically positioned on the tab bar where it is just adjacent to the final tab that is open.
Related
modal popup and marked blue left below
Is there any way to block modal(? - this is my understing for the box) popup automatically? I'm working on Mac, The bule color marked in left below is saying "do not open one day". I clicked check-box but it shows continuously. My searching result is such popup is called modal/layered popup - I have no idea for such technology. Please help how to block or click automatically by using Pythoin, javascript or Apple script. I'm using Keyboard maestro app so I can put such code before or after opening site which has modal(?) popup. I need to open 8-10 sites so need help.
tried to remove cookies but appear continuously. I think it's better click check-box automatically. Alternative if any is also good if can click "do not open one day" checkbox automatically.
What I want is a mean to remove an item from the combobox without having to add a separate remove button somewhere else. So I want a remove button to appear at the right side on a combobox dropdown item when I hover over my mouse pointer on it. And, it is also OK if all the items have remove button at the right side and do not need hovering.
The images bellow will illustrate what I am saying [...please ignore my mspaint skils]
[combobox with remove button for hovering item]
https://i.imgur.com/kIMtF3G.jpg
[combobox with remove button for each item]
https://i.imgur.com/iyG23vG.jpg
[NOTE: Sorry, I cannot post images directly because it needs at least 10 reputation to post images.]
[I am new to python and wxpython. So please ignore my ignorance if any. And for the same reason any simple code sample will be greatly helpful.]
Regards.
The wx.ComboBox does not have this feature. The wxPython GUI toolkit uses the target platform's native widgets. If those widgets don't support doing it, then neither does wxPython.
However, wxPython does have custom widgets or you could create your own widget to do this sort of thing.
I also think you could use a context-menu for this task. You would need to right-click to make it work. Another method would be to bind to a mouse event and try to figure out where in the widget you are, but I think that method would be error prone.
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.
In my python GTK project, I have a popup menu which pop-ups while typing in a particular text area. But, when type a letter popup menu get the focus and I can't type anymore in the text area until I click on the text area and grab the focus manually. I want to keep the focus to the text area as I type regularly while popup menu comes. Can anyone give tell me a way to do this. I tried widget.grab_focus() method. But it didn't solve my problem.
Also I want to know how to set the position of the popup menu. It always appears near by mouse pointer. I want it to appear near by my application.
Thanks all.
I ran into the same problem using the C API, the solution was to invoke the following functions, I presume they're approximately similar to the python equivalents:
gdk_pointer_ungrab(GDK_CURRENT_TIME);
gdk_keyboard_ungrab(GDK_CURRENT_TIME);
gtk_grab_remove(menu);
I need to add a popup dialog box on my GUI.
So, when ever I hover my mouse over a label, it should be able to show a popup( Like the type we get while hovering over a file in windows).
It should also disappear as soon i move away the mouse.
To start with, I am not even sure which module or class to use. I tried menu, but the results are not what i expected.
I also tried to learn tkCommonDialog, but couldn't understand it properly.
Please Advice!
The little popup window is called a tooltip.
This post may be relevant: http://bytes.com/topic/python/answers/505848-tkinter-button-overrelief
Take a look at the Balloon widget in the Tix package. I think it is just what you are looking for.