Results 1 to 2 of 2

Thread: View/edit database in a table and in a form

  1. #1

    Question View/edit database in a table and in a form

    Dear All,

    I have a task where a user should be able to view/edit a database in both table and form style.
    I have made a model for my data and it works fine with QTableView.
    But I have problems with viewing/editing records in a form-like style.Forms are to be made with QDesigner.
    QLineEdit-s, QComboBox-es, e.t.c. should represent fields from database querries.
    I tried to inherit QAbstractItemView (as shown in PieView example)
    but so far I have no luck.

    I would highly appreciate you giving me a good hint how to do it and would be gratefull if you could share your experience.

    Thanks a million in advance.

    Qt4.1

  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: View/edit database in a table and in a form

    If you search the forum, you'll notice a thread or two where I wrote about implementing a controller for standalone widgets to act as small model views where each widget is responsible for a single item (or even a single role of an item). You should do it this way too. Of course if you insist on implementing a complete view, it'll work nicely too. In that case if you tell us what problems you have, we'll try to help you.

Similar Threads

  1. Filling combobox from database
    By Philip_Anselmo in forum Qt Programming
    Replies: 3
    Last Post: 11th May 2006, 17:53
  2. displaying any table on a qdatatable
    By Philip_Anselmo in forum Newbie
    Replies: 4
    Last Post: 9th May 2006, 22:12
  3. creating table plugin
    By mgurbuz in forum Qt Programming
    Replies: 3
    Last Post: 28th April 2006, 13:50

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.