Results 1 to 3 of 3

Thread: QCheckBox on QDataWidgetMapper

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 334 Times in 317 Posts

    Default Re: QCheckBox on QDataWidgetMapper

    Inherit the model class. In that class make ur own display function. Call this function instead of the setData function.
    Pseudo code -
    Qt Code:
    1. class myModel :public someModel
    2. {
    3. private :
    4. setData() ; // original setData . Redeclaring it in private will make it private.
    5.  
    6. public :
    7. mySetData()
    8. {
    9. // do ur conversion
    10. setData(); call the private method
    11. }
    12. };
    To copy to clipboard, switch view to plain text mode 

    Hope u get the idea

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

    Banjo (5th June 2008)

  3. #2
    Join Date
    Jan 2008
    Posts
    39
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    10

    Default Re: QCheckBox on QDataWidgetMapper

    Hello
    Thanks for that. I had a bit of a closer look and found that the QTextEdit is where the html is coming from so I just upgraded and now use QPlainTextEdit.
    Last edited by Banjo; 5th June 2008 at 06:06.

Similar Threads

  1. QDataWidgetmapper
    By locus in forum Qt Programming
    Replies: 7
    Last Post: 5th June 2012, 11:24
  2. inserting QCheckBox into the Header
    By ru_core in forum Qt Programming
    Replies: 16
    Last Post: 16th April 2008, 19:26
  3. Replies: 3
    Last Post: 21st January 2008, 12:22
  4. QDataWidgetMapper and QSqlRelationalTableModel problem
    By larry104 in forum Qt Programming
    Replies: 1
    Last Post: 14th November 2007, 15:46
  5. QDataWidgetMapper <=> QComboBox best practice
    By saknopper in forum Qt Programming
    Replies: 1
    Last Post: 18th January 2007, 10: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
  •  
Qt is a trademark of The Qt Company.