QtDesigner: is it possible to assign top menu item handler? - qt-designer

In QtDesigner, if i have a pushbutton and want to add a handler for it all i need to do is to right-click this button and select "go to slot" - QtCreator will automatically add a code and connect signal to slot. But top menu items don't have a "go to slot" in right click menu O_O. Is it possible to add handler to top menu item in QtDesigner? Of course i can write a "conect" method manually at constructor, but it's much more easily to do a few clicks in QtDesigner itself -_-.

On every menu item added corresponding 'command' will be displayed at 'commands' QtDesigner window. Right-click command and select 'go to slot'.

Related

Can't add icon to Action Right Click Drop Down Menu in Notes Client View

I am trying to add an icon to the Right Click, Drop Down Menu , on an Action, in a View. The icon shows up in the Action Bar (with no text, but that is how it's supposed to work) at the top (see image) but in the drop down menu, it does not appear, only the text does. Is there something I am missing? Is this not suppported?
In my opinion this feature is only supported for actions in the action bar:

Linux whiptail or dialog with menu and input together

I want to use the 'whiptail' package to generate a menu box and input box simultaneously on screen. Is this possible? Or maybe with dialog? I can't find any example of this.
I want something like this:
Menu item 1
Menu item 2
menu item 3
if none of the above, type your own:
Inputbox:
The user could either select one of the entries from the menu or type in his own input. How do I do this?
(I did see the dialog 'inputmenu' widget, but with the Ok/rename/cancel, its a bit clunky.)
The --inputmenu option in dialog is the closest fit; anything more would require a custom application. Regarding the "Ok/rename/cancel", there is some flexibility (see manual page):
--nocancel
Suppress the "Cancel" button in checklist, inputbox and menu box
modes. A script can still test if the user pressed the ESC key
to cancel to quit.
--extra-label string
Override the label used for "Extra" buttons. Note: for input-menu widgets, this defaults to "Rename".

How to add custom options menu when Right Click on edit tool - Livecode

I want to create object and I want to add custom options menu when Right Click on edit tool.
This image :
I want to add custom menu on top "Edit Script"
How do I do ?
Not sure what you really are asking. When you right-click on an object, the IDE throws up a menu because it invokes the command: revPopUpMenu. Try this, just put the command in a button script.
If you want to make this your own, without hacking the IDE menu, then why not use a normal click and show a pullDown menu instead. You can populate the menu items as you wish, including especially the ability to populate on the fly based on the object clicked on, or any other attributes that might be local to that object or event.
Craig Newman
Here's an example to add to the IDE's context menu - originally posted on the livecode forums. There's also an example stack you can download : http://forums.runrev.com/viewtopic.php?f=9&t=18613
# catch the IDE's context menu message
on revHookBuildObjectEditorContextMenu pMenuTarget, pMenuName, #pMenu, pModifiedMenu
# custom menu item
put "Custom Item" & "-" & LF before pMenu
pass revHookBuildObjectEditorContextMenu
end revHookBuildObjectEditorContextMenu
# catch the IDE's message when an item is selected from the context menu
function dispatchContextMenuPick pMenuName, pItem
switch word 1 to -1 of pItem
case "Custom Item"
answer "Custom Item Selected"
exit to top
break
end switch
pass dispatchContextMenuPick
end dispatchContextMenuPick
To get it to work, put the code above into a button then use;
insert the script of button "MyFrontScript" into front

how can i add mouse down event on picture control in vc++

i want indentify all mouse click event like WM_LBUTTONDOWN and WM_LBUTTONUP, on picture control in vc++,
but i am not able to do this
please tell me how can i identifies all events separately.
thanks in advance.
You should enable property "Notify" of PictureControl to get the event.
You can add an event handler to the picture control using Visual Studio IDE and modify the code for handler function. That should be easy.
I'm guessing you're using MFC. In that case you have to add an activex control to your dialog.
i. Adding the control: To add such a control to your dialog box right click your dialog box and click the option called "Insert ActiveX Control". A modal dialog box appears. You have to select "Microsoft Forms 2.0 Image". Click OK. Control is added.
ii. Select an image: Right click your newly added control and select "Properties". Select your desired image clicking the picture attribute. Also there are other properties to customize the picture i.e, stretching, clipping image etc. You'll see your image is loaded into the control.
iii. Adding the handler function: Right click the control and select "Add Event handler". From the new modal dialog box select "MouseDown" or "MouseUp" as message type and click "add and edit". Add your code to achieve desired behavior.
N.B: MFC is not available with Visual C Express. You need a professional version of VS to compile MFC code.

How can I add a menu item to Gnome's window menu?

In Gnome, when I right click on a window title bar, I get the window menu:
How can I add a menu entry and my own custom menu callback handler to this window menu without recompiling gnome? Is this possible?

Resources