Re: Adding MyWidget to .ui from design
So I am trying to make a SVGViewer. I have DisplayWidget and window classes (both with .h and .cpp files). Also a main method. What I would like to do is that add my DisplayWidget to my Window but from .ui files Design part. Can somebody help me please?( The similar example is here: http://doc.qt.nokia.com/4.7-snapshot...generator.html) If you look here you will see that window.h does not contain a DisplayWidget variable but in the window.cpp file it uses the displayWidget variable to update both background and shape. When I write the same thing I get the error of : displayWidget is not declared in the scope (for update Background and Shape)
Added after 30 minutes:
I tried to promote the widget but I cant click on the Promote button.
Re: Adding MyWidget to .ui from design
You need to add a plain QWidget to your UI in Designer and promote it to DisplayWidget. See here for details.
Re: Adding MyWidget to .ui from design
Thank you very much you just made my day