Results 1 to 2 of 2

Thread: Q3TextEdit custom context menu

  1. #1
    Join Date
    Jan 2006
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Q3TextEdit custom context menu

    Hi,

    How to implement custom context menu for Q3TextEdit ?

    I use the below code, but the signal is not emited.
    It still display the default menu.

    Q3TextEdit *messageEditor= new Q3TextEdit(topSplitter);
    messageEditor->setContextMenuPolicy(Qt::CustomContextMenu);
    connect(messageEditor,SIGNAL(customContextMenuRequ ested ( const QPoint &)),
    this,SLOT(slotEditorMenuRequested(const QPoint &)));

    Regards
    Teh

  2. #2
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: Q3TextEdit custom context menu

    You can try an event filter and filter out the QContextMenu event, then show your own menu.
    It's nice to be important but it's more important to be nice.

Similar Threads

  1. Custom QTreeWidgetItem context menu?
    By AaronMK in forum Qt Programming
    Replies: 4
    Last Post: 1st February 2010, 05:42
  2. Context Menu on QTableWidget
    By ankurjain in forum Qt Programming
    Replies: 9
    Last Post: 17th December 2009, 10:52
  3. Shortcut key for context menu
    By darshan.hardas in forum Qt Programming
    Replies: 1
    Last Post: 28th December 2008, 21:32
  4. context menu problem
    By dreamer in forum Qt Programming
    Replies: 1
    Last Post: 25th May 2008, 14:18
  5. Replies: 4
    Last Post: 25th June 2007, 21:40

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.