Results 1 to 8 of 8

Thread: where is propertyChanged() ?

  1. #1
    Join Date
    May 2010
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question where is propertyChanged() ?

    Hi!
    In the Qt Creator, when i change a value of Property Editor ,the PropertyEditor(class) will emit propertyValueChanged, and the class of QDesignerIntegration has a slot, that is
    connect(designerPropertyEditor, SIGNAL(propertyValueChanged(QString,QVariant,bool) ), this, SLOT(updateProperty(QString,QVariant,bool)));
    and then ,the updateProperty() will emit propertyChanged(), that is

    signals:
    void propertyChanged(QDesignerFormWindowInterface *formWindow, const QString &name, const QVariant &value);

    problem: i can not find a slot which accepts the propertyChanged ?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: where is propertyChanged() ?

    The signal is for your own plugins so that they can react on changes in properties by implementing slots accepting this signature.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    May 2010
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: where is propertyChanged() ?

    Quote Originally Posted by wysota View Post
    The signal is for your own plugins so that they can react on changes in properties by implementing slots accepting this signature.
    Thanks,wysota!
    But the codes i said are the source codes of Qt, not mine. I just want to know how realizes the propertyChanged() for a QWidget in the Qt's source codes, for example the QPushButton.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: where is propertyChanged() ?

    I don't understand what you mean. QWidget doesn't have such signal. This signal, as I said, is specifically for Qt Designer plugins implementing things such as Designer's property editor extensions. You can't use this signal in regular Qt applications.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    May 2010
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: where is propertyChanged() ?

    Quote Originally Posted by wysota View Post
    I don't understand what you mean. QWidget doesn't have such signal. This signal, as I said, is specifically for Qt Designer plugins implementing things such as Designer's property editor extensions. You can't use this signal in regular Qt applications.
    yeah, you are right.
    you know ,when i change a property's value of a Widget in the right of the Qt Creator, the PropertyEditor will emit the perprotyChanged, i just want to know, who has a slot accepting the signal.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: where is propertyChanged() ?

    I already told you that twice. If you still are not convinced I'm right, grep Qt sources for the signature and see what (if anything) implements a slot with such a signature.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    May 2010
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: where is propertyChanged() ?

    Anyway,Thanks a lots.
    I know! You mean that this signal is just for the Qt Designer plugins.
    And if i select a QWidget(for example QPushButton, who belong to Qt, not a plugins) in the UI designer of Qt Creator, and then, i chang a value of the QWidget in its PropertyEditor where is in the lower right corner of the Qt Creator.What's happen now? Who to respond to this change?
    Once again, thank you!

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: where is propertyChanged() ?

    Do you really want me to say this for the third time? You can write a Deisgner plugin that will do something when a property of a particular widget changes its value.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 2
    Last Post: 26th April 2010, 10:46

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.