Results 1 to 6 of 6

Thread: Change state on dynamic elements.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Change state on dynamic elements.

    When creating an object, assign it to some variable (like "rect" in your code but something you can access from outside the function creating the object). You can then access the object through the variable.
    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.


  2. #2
    Join Date
    Aug 2013
    Posts
    5
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Change state on dynamic elements.

    Thank you. Do you have an example?

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

    Default Re: Change state on dynamic elements.

    Here is one option:

    javascript Code:
    1. Item {
    2. property Item dynamicItem
    3.  
    4. function createItem() { dynamicItem = cmpnt.createObject(...); }
    5. }
    To copy to clipboard, switch view to plain text mode 
    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.


  4. #4
    Join Date
    Aug 2013
    Posts
    5
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Change state on dynamic elements.

    Thank you, but in my case I cannot figure out how to do to change the state of my element. Can you help me?

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

    Default Re: Change state on dynamic elements.

    Assign the state name to the "state" property.
    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. Change state property within a current state?
    By prophet0 in forum Qt Quick
    Replies: 1
    Last Post: 30th May 2012, 19:23
  2. Replies: 3
    Last Post: 26th July 2011, 19:11
  3. Replies: 1
    Last Post: 20th January 2011, 17:17
  4. Handling window state change
    By sudhansu in forum Qt Programming
    Replies: 0
    Last Post: 10th November 2010, 12:28
  5. Change position according to QCheckBox State
    By champ in forum Qt Programming
    Replies: 5
    Last Post: 6th June 2010, 18:37

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
  •  
Qt is a trademark of The Qt Company.