Setting up a QMenu
-
I've been looking around at a variety of QMenu creation tutorials one of which comes from the Qt team, http://doc.qt.io/qt-5/qtwidgets-mainwindows-menus-example.html it seems like there is a ton of overhead involved in doing this so my question is, is there an easier way of doing this?
By easier I don't mean "Less complex" I just mean less code I fully understand what's occurring in the above link I just can't accept that it's the best way of setting up a menu as it seems very inefficient.
-
Hi @Suroh6 ,
As @Wieland suggested , using UI is best option . you can have very very less code. you can add signals and other Qt things directly with out any code. you can also access all the objects of the UI again in the code. Like this.. UI *spinBox1->setRange(1,10) ;
If you want to code only C++, then the option to reduce couple of lines code by coding with skill. But it reduces may be couple of lines that's it.
Using UI, is always best option for the people who dont want to see more code and its highly user friendly.