You Are Here:

Community: Wiki

 

Talk:Creating Menu from QPushButton in Qt for Symbian

From Forum Nokia Wiki

This article is for beginner, who want to create menu using push-button tool available in Qt. Useful code example is given in which user can change and try something different.

Also output is shown graphically, which is must important in this kind of article...

Rahulvala



This article creates a menu in different style. When a button is pressed, a menu is created. To accomplish this task, mainly QPushButton and QMenu are used. QPushButton API is for Button and QMenu Creates a menu when a Button is pressed, here in this case Menu Button is pressed.

This article represents some basic code and APIs that will definitely help to beginners. --Vkmunjpara 21:52, 25 September 2009 (UTC)



Usually menus in Qt can be created using QMenuBar class. If application is derived from QMainWindow class then it has method, called menuBar(), which return the menu bar for the main window, otherwise you need to create and add menu using QMenuBar class.

A Pop-up menu is a menu in a GUI application that appears upon user interaction, such as a touch on some part of widget. It can be created by using QMenu class which provides a menu widget for use in menu bars. QPushButton::setMenu() associate menu widget with QPushButton, and thus create pop-up menu. Usually pop-up menu is useful to show menu on clicking some part of widget. pop-up menu can also be created on some other events, QPushButton is not only the way to create pop-up menu.

Article describes the way to create popup menu using QPushButton. Althogh article have less explanation the code is useful to beginners to crate pop-up menu.

--kamlesh sangani 11:43, 26 September 2009 (UTC)


 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2findeE78E2ephpE2fGuaranaUIE2dE44ocumentationX qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqfntypeZWikiContentQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZtypeQUqfntypeZWikiContentQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqfntypeZWikiContentQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ