PDA

View Full Version : Why Q_PROPERTY can not appear in designer?



Gourmet
3rd November 2016, 15:01
3 weeks ago I created custom widget with Q_PROPERTY as type QString. All works fine. Yesterday I made another one plugin with widget using same technique. But property of this widget does not appear in Designer. I created new plugin as likeness of first one. Project file is copy of the first with only source file names changed. Sources are copies too with other classes and files name. The only one noticable difference is - header file of widget is in low case but class name inside has uppercase letters.

If I make same property not as "static" but as "dynamic" in domXml() method of this plugin - then property appears. But I need static to bind the method processing string entered.

What can go wrong? What should I check to find problem?

Added after 1 44 minutes:

Solved. Designer plugin method name() must mandatory return same name as custom widget class has.