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. Rename file use virtual Keyboard in the QTableView
Qt 6.11 is out! See what's new in the release blog

Rename file use virtual Keyboard in the QTableView

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 1 Posters 655 Views
  • 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.
  • F Offline
    F Offline
    flist
    wrote on last edited by
    #1

    hello, every one!
    I use the QFileSystemModel show files in the QTableView, and now I need to rename the file via the virtual keyboard.

    Although I set all triggers to QTableView, one click did get cell in edit and can see the blinking cursor, virtual keyboard still not showing up. I have to click the editor again, then virtual keyboard could show up, but the editor is closed too.
    I refer to the following link, but I do not know how to handle -- QApplication::postEvent(lineEdit, evt);
    My code as follows:
    void UI_FileManage::slot_editRename()
    {
    if(false == tableView_view->currentIndex().isValid())
    return;
    tableView_view->edit(tableView_view->currentIndex());
    }

    thanks

    1 Reply Last reply
    0
    • F Offline
      F Offline
      flist
      wrote on last edited by
      #2

      The link : https://forum.qt.io/topic/55735/solved-qtableview-edit-with-one-click
      sorry, I forgot to add it.

      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