This question already has answers here:
PyQT QPushButton.setMenu? How to make it work?
(1 answer)
Qt: Drop-down button?
(8 answers)
Closed 9 months ago.
In my application, I don't want to clutter the screen with too many buttons, so I want to add multiple actions to one button. Even thought I could accomplish it through things like double clicking or modifier keys, those solutions are in no way intuitive for the user. I want to have a button that has an additional dropdown menu, which can be used to change the action of the button. To illustrate, here is a rough sketch of what that would look like:
Is this possible PyQt5 or PySide6? Thank you for your help.
Related
This question already has answers here:
PySide switching widgets with events?
(2 answers)
How to change UI in same window using PyQt5?
(1 answer)
Closed 2 years ago.
The project is based in Python 3.7.
I'm working on a project that requires the use of the tabs widget. Lets say I have two tabs. On tab 1 there is a drop down menu with two different options. I need these two options to determine what will be displayed on tab 2. For example, if option 1 on tab 1 is selected then tab 2 could show a simple list or, if option 2 on tab 1 were selected then tab 2 will show a check box.
My naive thought it I might be able to create three different widget panels, each with the required widgets and displays for tab 2. Then a simple if/else check could determine which option number is selected and thus which widget panel to display can be selected. This is a guess at best though and I'm not sure how one would implement this.
This question already has an answer here:
Set default caret position inside entry widget in Tkinter Python
(1 answer)
Closed 3 years ago.
My GUI is structured such that I have a main class, and each page of my GUI, of which I can navigate between, is instantiated whenever I call it. One of my pages has an entry box, but i have to manually move my cursor and select the entry box to begin typing. Is there a way for the entry box to automatically be selected when I call that page?
Seems like an interesting problem
You should use focus().
For Example, if your entry widget is e. Then use e.focus().
This question already has answers here:
Load whole *ui file in an frame/widget of another *.ui file
(1 answer)
PyQt: How to switch widgets in QStackedWidget
(5 answers)
Creating a custom widget in PyQT5
(2 answers)
Closed 3 years ago.
I am making a simple app and was wondering what the standard is for multiple windows when using Qt Designer and python.
I need to be able to have functional back and next buttons which will take me to the previous screen like in simple .exe installers.
I do not want to use the tab widget.
I have tried using the stacked widget but when using layouts on my first screen it gets inserted into the grid layout.
This question already has an answer here:
PyGObject and glade send window to the front
(1 answer)
Closed 8 years ago.
I am currently building an application with python 2.7 with Gtk3+.
I want to open a window on top of another window. If the second window is visible, the parent one should not be clickable.
So the behaviour should be the same like opening a dialog window.
What is the best way to achieve this?
You need to use the property window.set_transient_for(parent_window)
This post may help you if you are using glade.
This question already has an answer here:
How do I add a label to wxWidgets wxBitmapButton?
(1 answer)
Closed 9 years ago.
How do I create a bitmap button with attached text label in wxpyython. I have not come across any such generic buttons till now. I believe I will have to create one myself. How do I do it?
Thanks in advance
Look at the wx.lib.buttons module for various flavors of generic buttons.
Also, in the 2.9 release series the stock button class (wx.Button) can have a bitmap + text label.