Results 1 to 8 of 8

Thread: Help plz! I’m stuck with these delegates

  1. #1

    Question Help plz! I’m stuck with these delegates

    I need to control items individually in a QTableWidget , I’m using Delegates, I have a column with a QTimeEdit and I want to be able to use this QTimeEdit as a Timer (Chronometer) I want t be able to start a specifique one depending on the selected Row
    Thanks a lot guys

  2. #2

    Default Re: Help plz! I’m stuck with these delegates

    Any solution PLZ?

  3. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Help plz! I’m stuck with these delegates

    Could you elaborate? What did you try so far and what's the problem you're facing?
    J-P Nurmi

  4. #4

    Smile Re: Help plz! I’m stuck with these delegates

    Thanks jpn , I just want to control a specific item (the item will be defined by a row and a column) in a QTableWidget, right now I can only control a specific column, again, I’m using Delegates, Thanks

  5. #5
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Help plz! I’m stuck with these delegates

    Quote Originally Posted by codeaddict View Post
    I just want to control a specific item (the item will be defined by a row and a column) in a QTableWidget
    Well, this is exactly what QTableWidgetItem is for. Anyway, the keyword here is "control". Exactly what do you mean with it?

    right now I can only control a specific column, again, I’m using Delegates
    Why would delegates be restricted to a specific column?
    J-P Nurmi

  6. #6

    Smile Re: Help plz! I’m stuck with these delegates

    Thanks again JPN,

    Why would delegates be restricted to a specific column?
    Well, that’s the question men, How can’ I define an index with a row and a column? Is that possible just with QModelIndex or I should subclass QAbstractModelIndex to do it?
    Look at this:



    For example I want to be able to use those QTimeEdit in column 1 as Timers (Chronometers)
    And I want for example to start just that one on row 1
    Attached Images Attached Images

  7. #7
    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: Help plz! I’m stuck with these delegates

    There is no such thing as an abstract model index. You can do a thing similar to this:

    Qt Code:
    1. QWidget *XX::createEditor(... index ... ){
    2. if(index.row()==7 && index.column()=1) return new QTimeEdit;
    3. return QItemDelegate::createEditor(...);
    4. }
    To copy to clipboard, switch view to plain text mode 

  8. #8

    Thumbs up Re: Help plz! I’m stuck with these delegates

    Thanks man I really appreciate your help, I got the idea, Thanks a lot

Similar Threads

  1. Different delegates to different Columns of QTableView.
    By kaushal_gaurav in forum Qt Programming
    Replies: 4
    Last Post: 6th August 2008, 09:17
  2. Stuck with QGraphicsItem's setPos() method
    By salmanmanekia in forum Qt Programming
    Replies: 1
    Last Post: 12th June 2008, 10:05
  3. Compile of big generated file in release stuck
    By Equilibrium in forum Qt Programming
    Replies: 4
    Last Post: 31st December 2007, 12:25
  4. Delegates and Table
    By ankurjain in forum Qt Programming
    Replies: 8
    Last Post: 18th May 2006, 19:47
  5. comboboxes get stuck
    By illuzioner in forum Qt Programming
    Replies: 2
    Last Post: 30th March 2006, 01:03

Tags for this Thread

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.