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. Changing look of persistent editors in QTableView
Forum Updated to NodeBB v4.3 + New Features

Changing look of persistent editors in QTableView

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 2.1k Views 1 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.
  • K Offline
    K Offline
    kossmoboleat
    wrote on last edited by
    #1

    Hello,

    I am trying to build a QTableView with editors that are visible for all fields even when they haven't been clicked yet. To that end I've used the method openPersistentEditors(). This gave me nearly all I needed. My only problem is that the editors for QString, i.e. QLineEdit all display the text "cursor". By text cursor I refer to the normal vertical bar that marks the end of the currently edited text.

    As I have a couple of these QLineEditS in different cells, this doesn't look correct. When clicking in these editors one by one the text cursor disappears, but I hope there's a programmatic way to achieve the same effect.

    I've read that you can also use setIndexWidget() to get "persistent" editors, but I want to recover the changed data and I'd rather not rewire the widget's slots directly myself with the model, which seems complicated to me. Moreover I have a couple of different types and I'd rather not determine the correct widgets for the correct type myself, each time.

    I'm using Qt 4.6.2 on a Windows 7 machine.

    Thanks,
    Tim

    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