Create/Preview Custom Widget without using forms
-
wrote on 1 Mar 2017, 17:16 last edited by
Hello,
I have created custom widgets using forms before with great success. However, my current work project is to create custom widgets without the use of the form. Is there a way to preview the custom widget to see how it looks before actually building the plugin project, and then adding it to another application? Thanks!
-
Hi
If you don't use UI file and all looks comes from code,
how would you be able to
preview it before code is running ?But!
You can use promotion feature to see it running very easy without adding the an actual plugin. (to creator/designer)
http://doc.qt.io/qt-5/designer-using-custom-widgets.htmlSee "Promoting Widgets"
-
Hi
If you don't use UI file and all looks comes from code,
how would you be able to
preview it before code is running ?But!
You can use promotion feature to see it running very easy without adding the an actual plugin. (to creator/designer)
http://doc.qt.io/qt-5/designer-using-custom-widgets.htmlSee "Promoting Widgets"
wrote on 1 Mar 2017, 19:51 last edited byThe document you provided is a little confusing. I assume that the promotion feature is done on the application side? Is it possible to do so, while still in the development stage of the widget? Let's say I'm building a calculator, but I want to see how my layouts are looking so far, but my entire calculator widget is not yet complete. Is there a way to view what is created up to that point?
-
The document you provided is a little confusing. I assume that the promotion feature is done on the application side? Is it possible to do so, while still in the development stage of the widget? Let's say I'm building a calculator, but I want to see how my layouts are looking so far, but my entire calculator widget is not yet complete. Is there a way to view what is created up to that point?
-
-
I figured that was the case, but I wanted to be sure. I will just make a test application of the widget I want to create and when all that coding works, I'll go ahead and make the custom plugin. Thanks for your inputs!
@Sh1gs
Just as a note.
You can visually design the UI in Designer and then just grab the c++ code. ;)
If you look inside the setupUI, there is the code for what u have"drawn"
3/6