How do I add a drop down menu to a border layout in Qt
-
I have created a border layout, and I have created a menu layout following these two tutorials: http://doc.qt.nokia.com/latest/mainwindows-menus.html http://doc.qt.nokia.com/latest/layouts-borderlayout.html I am missing something fundamental when I try to put them together. My result is an application window with nothing in it. The border layout worked fine on its own as well as the menu (pulled straight from the reference). What's the best way to add a drop down menu to the border layout?
-
Answer:
Start with the menu example as a basis. Use the Window class from the other example instead of widget in the MainWindow constructor, so MainWindow::MainWindow() { QWidget *widget = new QWidget; setCentralWidget(widget); becomes MainWindow::MainWindow() { Window *widget = new Window; setCentralWidget(widget);
MaxRunFast at Stack Overflow Visit the source
Related Q & A:
- How can I add a slideshow to my site?Best solution by webstarts.com
- How can I add a clickable link to a question or answer on yahoo?Best solution by Yahoo! Answers
- How can I add a picture to a video?Best solution by Answerbag.com
- How do I add a photo to a Wikipedia page?Best solution by en.wikipedia.org
- How do I add a photo to a question?Best solution by Answerbag.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.