Results 1 to 4 of 4

Thread: QDialog with multiple backends

Threaded View

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

    Default Re: QDialog with multiple backends

    Sorry to say but I didn't understand it properly. You mean to say that every Backend would inherit the dialog or should contain a dialog object ? Also how my dialog class would have different implementation for Add, Edit, Delete ? Can you please explain ..
    -> Every backend will inherit a BaseBackend class
    -> BaseBackend or any other inherited backend will not have any knowledge about any dialog, all it knows is how to Add/Delete etc
    -> Dialog class know about the BaseBacked which will provied virtual methods to perform Add/Delete/Edit etc.
    -> There virtual methods will be implemented by the respective backend classes
    -> Dialog class knows how to trigger the editing (i.e button click or other UI operation).
    -> Editing/Adding operation is managed by the dialog, one the operation is done dialog will use the BaseBackend methods to save the data back to backend

    Mostly this will deal the C++ way of implementing interfaces.
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

  2. The following user says thank you to Santosh Reddy for this useful post:

    pratham_shah (15th May 2013)

Similar Threads

  1. Replies: 0
    Last Post: 21st December 2012, 16:56
  2. Phonon backends on Windows
    By Tirkedi in forum Qt Programming
    Replies: 0
    Last Post: 13th December 2011, 15:39
  3. Replies: 9
    Last Post: 25th March 2011, 21:22
  4. QDialog.exec() exiting without calling QDialog::accept()
    By doggrant in forum Qt Programming
    Replies: 3
    Last Post: 2nd February 2011, 11:35
  5. Replies: 1
    Last Post: 6th August 2010, 11:24

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.