Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Complex editor in delegate
Forum Updated to NodeBB v4.3 + New Features

Complex editor in delegate

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 521 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    achard.ju
    wrote on last edited by
    #1

    Hello everyone.

    I have a problem with complex editors created by a delegate to edit field of QTreeView.

    The editor contain a QLabel (hidden in this case), a QLineEdit and a QPushButton.
    I managed to gave focus to the QLineEdit at editor creation with setFocusProxy(ui.lineEdit)

    My remaining problem is when the QLineEdit looses focus (on clic in another part of the application), the editor is not closed, and so the setModelData not called.
    The only way to close the editor is to change the current item selected in the TreeView.

    I can't figure out where it comes from.

    Thanks for your help !

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Can you share your editor code ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved