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. [Solved] How to subclass QTableView when using the UI editor of QtCreator
Forum Update on Monday, May 27th 2025

[Solved] How to subclass QTableView when using the UI editor of QtCreator

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 5.1k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on 8 Dec 2011, 23:33 last edited by
    #1

    Hello folks:

    I've a QAbstractTableModel subclass working with a QTableView... so far so good.

    Now I would like to implement a "Drag and Drop" capability to my QTableView and here's where the problem arose for me, because I need to subclass QTableView but I've used the UI editor of QtCreator for my design, therefore the UI editor has created the QTableView for me, so right now I don't know what to do to achieve what I need.

    Thanks in advance guys.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on 9 Dec 2011, 00:40 last edited by
      #2

      In Qt Designer (or the design tool of Qt Creator) you can promote it to a custom widget. The "Using Custom Widgets with Qt Designer":/doc/qt-4.7/designer-using-custom-widgets.html doc has a detailed guide.

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on 9 Dec 2011, 07:09 last edited by
        #3

        Thanks for your quick, concise and right answer. I did it exactly as you suggested and it works like a charm.

        Thanks again Volker.

        1 Reply Last reply
        0

        1/3

        8 Dec 2011, 23:33

        • Login

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