Results 1 to 2 of 2

Thread: probleme avec un ListView

  1. #1
    Join Date
    Apr 2019
    Posts
    1
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default probleme avec un ListView

    bonjour à tous,

    J'ai une QQmlListProperty<classeA> nommé firstqmlList qui possede dans la classeA une autre QQmlListproperty<number> nommé secondQmlList et un QString name. dans mon main.qml j'ai :

    Qt Code:
    1. FirstQQml{
    2. ListView{
    3. model : firstqmlList
    4.  
    5. delegate: persoButton{
    6. Text{ text: name}
    7. }
    8. }
    9. }
    10.  
    11. SecondQQml{
    12. ListView{
    13. model : firstqmlList
    14.  
    15. delegate: ListView{
    16. model : secondQmlList // it is a list of number
    17.  
    18. delegate: Text{
    19. text : number
    20. }
    21. }
    22. }
    23. }
    To copy to clipboard, switch view to plain text mode 

    ca marche pour l'affichage, j'ai bien une liste de boutton avec le text nom. et une liste de numéro qui est lié au nom. Le probleme est lorsque je change de nom en appuyant sur le boutton j'aimerai que la liste de numéro change également mais ca ne le fait pas.

    Avez vous une idée pour résoudre le probleme

    Merci d'avance pour votre aide

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: probleme avec un ListView

    From what Google Translate tells me this sounds like missing property change notifications.

    Does the code that updates the number send the notification signal associated with the number list property?

    Would probably make sense to post the headers for the classes that are involved in these properties.
    Or at least the sections of the Q_PROPERTY definitions

    Cheers,
    _

Similar Threads

  1. Replies: 2
    Last Post: 11th February 2010, 10:35
  2. filesysteme avec Qt
    By chochatown in forum Qt Programming
    Replies: 3
    Last Post: 20th June 2009, 10:20
  3. Probleme d'execution Qt/XML
    By fhorizon in forum General Programming
    Replies: 2
    Last Post: 11th May 2009, 11:00
  4. Strange Release probleme
    By Simz in forum Qt Programming
    Replies: 2
    Last Post: 7th February 2008, 05:07
  5. Probleme mit QT4
    By ensacom1 in forum Qt Programming
    Replies: 2
    Last Post: 9th January 2007, 21:26

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.