Results 1 to 2 of 2

Thread: set the (global) min/max attribute of the persistentEditor

  1. #1
    Join Date
    Jan 2006
    Posts
    4
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default set the (global) min/max attribute of the persistentEditor

    I want to set the global min/max attribute of the 'persistentEditor'
    I use the QSqlTableModel/QTableView approach. The editor is usually a QDoubleSpinBox for doubles (numeric). I want to adjust the range of that editor. Let say by using the setRange method QDoubleSpinBox.setRange(0, 1000000).
    How can I do that? I know the index but i don't know how to get the QDoubleSpinBox.
    Please -I need a hint
    Regards - jmh

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    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: set the (global) min/max attribute of the persistentEditor

    If you only need to change the range on startup, then you might use QItemEditorFactory and register a new editor there.

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.