Results 1 to 3 of 3

Thread: [B]How to show Pixmap on QMenuBar??[/B]

  1. #1
    Join Date
    Sep 2006
    Location
    nanjing China
    Posts
    19
    Thanks
    3
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default [B]How to show Pixmap on QMenuBar??[/B]

    Hello, everyone!
    does anyone know how to show Pixmap on QMenuBar??!
    menu1=new QMenuBar(this) ;
    QPixmap app_Normal;
    app_Normal.convertFromImage(app_normal);
    menu1->insertItem(app_Normal);
    But it doesn't show the Pixmap.
    what's the problem with these codes?
    Could you supply me with your codes?

    Thank you !
    It is the same old story of not being grateful for what we have until we lose it..........

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: [B]How to show Pixmap on QMenuBar??[/B]

    That's the wrong way to go!
    First of all, you have to load the pixmap from somewhere(something) and then set it to a menu item.

    You will have to read carefully the documentation for QPixmap, QMenuBar and QMenu.

  3. The following user says thank you to marcel for this useful post:

    bigbigmoon (17th April 2007)

  4. #3
    Join Date
    Sep 2006
    Location
    nanjing China
    Posts
    19
    Thanks
    3
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: [B]How to show Pixmap on QMenuBar??[/B]

    Thanks a lot!
    I have solved the problem!
    It is the same old story of not being grateful for what we have until we lose it..........

Similar Threads

  1. Showing Pixmap as a QListWidget Item
    By vishal.chauhan in forum Qt Programming
    Replies: 1
    Last Post: 1st February 2007, 13:25
  2. where could QPopupMenu show besides QMenuBar !
    By bigbigmoon in forum Newbie
    Replies: 4
    Last Post: 2nd November 2006, 02:03
  3. load pixmap from another host
    By raphaelf in forum Newbie
    Replies: 16
    Last Post: 31st August 2006, 23:58
  4. Invalid pixmap
    By munna in forum Newbie
    Replies: 2
    Last Post: 8th June 2006, 09:00
  5. Paint XP radio button to pixmap
    By Ben.Hines in forum Qt Programming
    Replies: 2
    Last Post: 26th April 2006, 22:15

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.