Results 1 to 7 of 7

Thread: Reimplement currentChanged and selectionChanged problems ??

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2010
    Posts
    319
    Thanks
    1
    Thanked 14 Times in 12 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Reimplement currentChanged and selectionChanged problems ??

    Quote Originally Posted by tonnot View Post
    Keep needing help on this.
    No, what you need is to do your homework and read Qt's documentation (more carefully, if you have already read it).

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

    tonnot (20th April 2011)

  3. #2
    Join Date
    Sep 2010
    Posts
    654
    Thanks
    56
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Reimplement currentChanged and selectionChanged problems ??

    From help : (model view tutorial)
    Views manage selections within a separate selection model, which can be retrieved with the selectionModel() method. We retrieve the selection Model in order to connect a slot to its selectionChanged() signal.
    So, I have now something likethis:
    Qt Code:
    1. QItemSelectionModel *selectionModel= Table>selectionModel();
    2. connect(selectionModel, SIGNAL(selectionChanged (const QItemSelection &, const QItemSelection &)),
    3. this, SLOT(selectionChangedSlot(const QItemSelection &, const QItemSelection &)));
    To copy to clipboard, switch view to plain text mode 

    Ok, now it works (not very well but I have not the last problems)

    And, I can to reimplement the currentChanged slot or is it forbidden ?

    PS: I pray everyday in order QT people include more information into QT Reference

Similar Threads

  1. QTabWidget currentChanged signal
    By vkincaid in forum Qt Programming
    Replies: 4
    Last Post: 9th December 2009, 18:07
  2. Problem connecting selectionChanged
    By jano_alex_es in forum Newbie
    Replies: 2
    Last Post: 1st June 2009, 15:57
  3. ListView and CurrentChanged
    By kroenecker in forum Newbie
    Replies: 13
    Last Post: 24th March 2007, 02:35
  4. no such signal QListBox::currentChanged()
    By jopie bakker in forum Newbie
    Replies: 2
    Last Post: 2nd March 2006, 15:17
  5. QTabWidget SIGNAL currentChanged()
    By campana in forum Qt Programming
    Replies: 3
    Last Post: 28th February 2006, 10:09

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.