Results 1 to 1 of 1

Thread: moveCursor not called in a QTreeView

  1. #1
    Join Date
    Jan 2011
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: moveCursor not called in a QTreeView

    Hi,

    I am facing a quite complex problem. In a QTreeView/QAbstractItemView, the moveCursor() function is sometimes simply not called.

    Actually, on the base level of the tree, it behaves correctly. But on children items, the behaviour becomes weird for on some columns. Item is deselected and another item (or nothing) gets the selection.

    Except from this, my model works great, so index() function must be correct. I have really no idea what further information I could give right now, since I know nothing of Qt mechanism responsible for calling moveCursor().

    If someone can give me a hint, this would be great, thanks in advance.
    Mathieu


    Added after 21 minutes:


    Ok, I've found a part of the problem. The column causing troubles contains a QComboBox. My model/view fails only on this column.
    I can avoid the problem if I don't emit the dataChanged() signal in the setData() function of my model... Is it "legal" doing this, is it really necessary to emit the signal ?


    Added after 25 minutes:


    So, the problem relies on a bad editor closing implementation... Sorry for the mess.
    Last edited by mathieuS; 22nd July 2011 at 21:26.

Similar Threads

  1. Destructor not being called
    By vieraci in forum Qt Programming
    Replies: 12
    Last Post: 25th January 2012, 15:06
  2. dropEvent() is never called
    By kervich in forum Qt Programming
    Replies: 1
    Last Post: 10th September 2010, 13:13
  3. Why Qt is called Qt?
    By nifei in forum Qt Programming
    Replies: 1
    Last Post: 10th October 2009, 07:40
  4. Slot gets called twice
    By greatgatsby in forum Newbie
    Replies: 7
    Last Post: 20th August 2009, 15:11
  5. SLOT not being called
    By steg90 in forum Qt Programming
    Replies: 4
    Last Post: 6th December 2007, 11:30

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.