qt custom widgets propertis are not getting updated properly in Qt designer

Posted by user553911 on Stack Overflow See other posts from Stack Overflow or by user553911
Published on 2010-12-25T17:49:09Z Indexed on 2010/12/25 17:54 UTC
Read the original article Hit count: 195

Filed under:

I have created a custom widget. The widget gets loaded fine,the properties appear in QT Designer, Only problem is every time I change the property of Alpha key,the numeric also gets set, Though the accessor functions are different,and the enums are differnet and values are different. Also whenever i check the Form->view code,the values would have got modified. Am i Missing something or this is a designer issue,Any workarounds would be appreciated

class key { Q_PROPERTY(AlphKeycode_t AlphKeycode READ AlphKeycode WRITE setAlphKeycode); Q_PROPERTY(bool AlphKey READ isAlph WRITE setAlph); Q_ENUMS(AlphKeycode_t);

Q_PROPERTY(NumKeycode_t NumKeycode READ NumeKeycode WRITE setNumKeycode); Q_PROPERTY(bool NumKey READ isNum WRITE setNum); Q_ENUMS(NumKeycode_t);

}

struct AlphData { QString label; bool isAlphabetic; };

struct NumData { QString label; bool isNumeric; };

AlphData AlphKeyData[] = {
{"q",true }, } NumData NumKeyData[] = { {"1", false}, }

© Stack Overflow or respective owner

Related posts about qt-designer