Questions tagged [qwidgetaction]
8 questions
2
votes
1 answer
QWidgetAction doesn't work inside QMenu as a context menu for tray
I'm trying to insert a QWidgetAction inside a QMenu, which will be used as a context menu for tray. When I do this, I only get an empty line inside my menu.
I'm using:
Qt 5.5.1.
Plasma 5 desktop environment (Linux).
Here is my code:
action = new…

mvlabat
- 577
- 4
- 17
1
vote
0 answers
How to make QLabel wrapped in QWidgetAction match the position and the font size of standard menu items?
I am currently working on a tray app in python/pyside2. I am trying to create custom QMenu items (containing QLabels and QProgressBars). I managed to get the basic functionality, but the alignment and font size of QLabels is different than the…

REjsmont
- 63
- 5
1
vote
0 answers
QLabel appears grayed out inside QWidgetAction
I am using a QWidgetAction to create a QMenu "item" that has a QLabel and a QLineEdit. These are added to a QHBoxLayout which is added to a QWidget which is set as the default in the QWidgetAction.
The end result is that everything works, except the…

durka42
- 1,502
- 10
- 17
1
vote
1 answer
TriState QAction in QMenu
I'm in need of a checkable QAction, that has besides the modes checked and unchecked the option of a partially check. This is basically already what QCheckBox provides, but unfortunately, QAction doesn't provide.
As a first attempt, I came up with…

Aleph0
- 5,816
- 4
- 29
- 80
0
votes
1 answer
PyQt Background colour of button doesn't change
For my text editor I'm trying to implement a QMenu to quickly create a table with a size of up to 10 columns and 8 rows (lines). It looks and works similar to what you have in Word or Google Docs like this:
(https://i.stack.imgur.com/IxbPf.png)
In…

Deator
- 5
- 3
0
votes
1 answer
QWidgetAction not showing menu
I've created a custom widget which is used in a QMenu. Which the menu is displayed the user clicks on the Block rectangle as seen in the image below. However when i change the way the Menu is assigned to the control, it stops working for some…

JokerMartini
- 5,674
- 9
- 83
- 193
0
votes
1 answer
Hiding QWidgetAction just grey it out
I'm trying to build a menu with some QWidgetAction.
Some of them can be hidden (using setVisible()), depending on the current state of the program.
When I hide a QWidgetAction, it isn't really hidden but seems to only be disabled, and other actions…

Trap
- 218
- 3
- 8
-2
votes
1 answer
QWidgetAction in QMenu are un-checkable if it has menu within
I am trying to implement tri-state checkboxes into a QMenu.
My menu hierarchy will be something like:
menuA
|-- a101
|-- a102
menuB
|-- b101
Where the first tier (menuA, menuB) are of tri-state checkboxes while its sub items are normal…

Teh Ki
- 455
- 1
- 3
- 14