QRect and QAction
-
My application has a QRect that moves and adjusts its size according to the Qmenu it has, I want to perform the same functionality but for the Submenus but being QAction they do not have geometry and I do not know how to do it.
what I have:
where I want to implement the same:
-
@Oumayma
Why in the world would you want to start out doing anything like this? Qt menus already have all of this functionality built into them, and you can influence the look via stylesheets if you wish, so why waste time reinventing the wheel? -
@Oumayma
I respect what you are saying. It is not an area I know about. But I will say two things:-
Still is it not possible to use the existing
QMenu
functionality and add in whatever you need, rather than completely rewriting it yourself? It seems to me you will do a lot of work to duplicate existing functionality. -
Have you at least looked through Accessibility for QWidget Applications, to see what Qt Accessibility already has to help you?
-
-
Hi,
@Oumayma said in QRect and QAction:
@JonB Because my Text Editor is for people with physical diversity who cannot use a keyboard or a mouse. That is why I need the options to be highlighted automatically as is done by hovering over them.
That's something that you should have mentioned in the first place.
As @JonB suggested you should start with the Accessibility module first.
Then, people with one form or another of impairing usually have their OS or Desktop Manager tailored for them in different ways with for example hight contrast themes. Your customization might run afoul of that.
They may also use input devices that are adapted to their needs.
So, while your intentions are good, you might be doing counter productive work.
Do you have any users in the pools you are targeting to test your application ?
Do you have a design document requiring these special cases ?
As said earlier, you might be emulating something that already exists and has been proven to work. -
@JonB @SGaist From the information I have been looking for, I understand that the accessibility implementation in Qt is a tool that helps the speech synthesizer to read the options that I have correctly. It is something very useful that I will implement later, but now the implementation that I am doing is that a user by means of a button can select the options of the menu or submenus that he has, for this I need to be able to modify the existing functionality of the menus so that instead If you have to move the mouse over the menu so that the options are highlighted, the options are automatically highlighted one by one and by means of the button select the option that the user wants.
-
What device does he use to handle mouse like interfaces ?
-
Can you give a bit more details about how this should work ?
-
@SGaist I will try to explain myself better, when you select an option from the menu, the actions contained in this menu are displayed, and if you place the mouse over the angle of the actions, it is highlighted as shown in the following image.
Well, I need those actions to be highlighted but without having to move the mouse and stand on top of them.
-
That part is clear, my question is: how does your user interact with your application ? Or even the system as a whole ? Does he have a mouse like device ? A standard mouse ? Something else ? How is he using the computer ?
-
@SGaist The user interact with switches as you can see in the link:
That are connected to adapters as you can see in the link:
-
Ok, so the target user will have one or maybe two buttons to do all actions ? Is that correct ?
-
Then I think you took the problem from the wrong end. You seem to want to force a conventional GUI to be adapted to an unconventional input device.
I think you should rather design your application with unconventional widgets that fits the input device.
From the looks of it, your menu's entries will get highlighted one after the other and the user shall click on the button in order to select the action but how will the user get to this menu in the first place ? And even before that, what will be the goal of your application ?