Results 1 to 5 of 5

Thread: Own function in widget menu when right click.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Own function in widget menu when right click.

    actionsContextMenu
    Should be CustomContextMenu! Use the emited customContextMenuRequested signal and connect it to your own slot. There you fetch the widgets actions via QWidget:actions() create a menu out of them, add your own actions and and execute it.

    OR

    set to actionsContextMenu, use the way you mentioned by adding the custom functions to the widget and it should work


    EDIT: If you want the same look and feel use createStandardContextMenu() and alter the retrieved QMenu with your own actions.

    Sorry for the confusing answers, but you will find all necessary informations...
    Last edited by Lykurg; 11th June 2009 at 20:13.

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Own function in widget menu when right click.

    maybe this can help you.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

Similar Threads

  1. QPSQL problem
    By LoneWolf in forum Installation and Deployment
    Replies: 60
    Last Post: 4th November 2009, 14:22
  2. Regading Driver to connect Postgresql Database
    By dummystories in forum Installation and Deployment
    Replies: 38
    Last Post: 12th March 2009, 07:19
  3. QPSQL driver in windows
    By brevleq in forum Installation and Deployment
    Replies: 31
    Last Post: 14th December 2007, 12:57
  4. how to add static library into qmake
    By Namrata in forum Qt Tools
    Replies: 1
    Last Post: 20th November 2007, 17:33
  5. use qpsql
    By raphaelf in forum Installation and Deployment
    Replies: 34
    Last Post: 22nd August 2006, 12:52

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.