Results 1 to 2 of 2

Thread: simple data binding

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

    Default simple data binding

    Hello,

    I want to bind simple data, not lists, trees, tables. Just few strings, numbers between my model class and screen view (appropriate widgets). What is the sipmlest way?

    Should I use QAbstractItemModel? Or it is better to use signals and slots for each value change? Or is there another simpler way?

    Thanks,

    Miro

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: simple data binding

    You could use any of these, it should be decided based on how data is used by view and model, if the usage fits into model/view interface classes then you can use QAbstractItemModel. It the data is simple and is limited to couple of strings then can use signal & slots.

Similar Threads

  1. Simple Plot after Inputing some Data
    By thebrute in forum Qwt
    Replies: 0
    Last Post: 18th August 2010, 14:29
  2. Binding data to a a QGraphicsItem (or something like that)
    By been_1990 in forum Qt Programming
    Replies: 18
    Last Post: 13th August 2009, 08:33
  3. Replies: 1
    Last Post: 7th July 2009, 07:13
  4. QUdpSocket binding
    By db in forum Qt Programming
    Replies: 0
    Last Post: 13th March 2008, 11:24
  5. binding
    By mickey in forum General Discussion
    Replies: 9
    Last Post: 26th September 2006, 21:54

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.