Can't use custom widget.

  • Hello,

    I have a simple class that inherits QWidget. I wanted to be able to access properties through Qt Designer, so I used Q_PROPERTY. Unfortunately that seems to be a limitation of Qt and promoted widgets, so I have been trying to make things work for the last 3 hours.

    I have reverted to unfortunately create a separate custom widget. When I compile this separate project, I can not figure for the life of me how to use it (yay). The docs say it will magically appear in Qt Designer once restarted (lmaorofl). Of course that doesn't work.

    I tried make install in the build dirs, as some examples mentioned, and that doesn't work either. I copied the dylib into ~/Qt/5.3/clang_64bit/plugins/ and that doesn't work.

    Finally I copied the dylib inside my .app and it crashes Qt Designer. Supposedly it crashes because the widget isn't compiled with the same compiler as Qt Designer, so people recommend ACTUALLY COMPILING QT... That will not happen.

    So I have many questions:

    1. Is this a joke?
    2. Is there a workaround to modify a property/variable inside a simple promoted widget? It doesn't have to be inside Qt Designer, but I need to set the property per object before compiling.
    3. If I have to use a custom widget, how the hell am I supposed to get it to work once it is compiled?
    4. Can I create a custom widget class inside my current application project, instead of having to create a new project.
    5. If I really have to create a different project, is Qt expecting me to copy/paste a dylib into a folder every time I compile a tiny change and want to see the result (lets say, move something 2 pixels)?
    6. What is love?

    Thank you, sorry if I sound irritated, I am irritated.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.