Results 1 to 3 of 3

Thread: How to insert a widget into QMenu?

  1. #1
    Join Date
    Jul 2008
    Posts
    14
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default How to insert a widget into QMenu?

    Hi,

    how is it possible to implement a more complex menu where a menu would contain other widgets? Is it possible to put any widget in the QMenu? For example, in the attached picture there is a whole color palette inserted in the menu. How to do things like that? In general case I would like to know how to insert a layout with other widgets into the QMenu.

    Thanks for any hints!!!
    Attached Images Attached Images

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to insert a widget into QMenu?

    QMenu is itself derived from QWidget.

    Why dont u subclass QMenu and add ur own layout and widgets u want ?

  3. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: How to insert a widget into QMenu?

    J-P Nurmi

Similar Threads

  1. How to Open & Close a Widget ?!!
    By Fatla in forum Qt Programming
    Replies: 6
    Last Post: 13th June 2008, 20:39
  2. make a widget paint itself even thought it is not shown
    By momesana in forum Qt Programming
    Replies: 7
    Last Post: 28th April 2008, 11:57
  3. Tricky problem with ARGB widget / UpdateLayeredWindow
    By nooky59 in forum Qt Programming
    Replies: 3
    Last Post: 21st February 2008, 10:35
  4. [Qt 4.1.0] Split a widget on demand
    By Townk in forum Qt Programming
    Replies: 3
    Last Post: 17th February 2006, 14:16
  5. insert a widget into a group "on-the-fly"
    By soul_rebel in forum Qt Programming
    Replies: 4
    Last Post: 15th January 2006, 00:29

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.