Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

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

    General and Desktop
    2
    3
    4950
    Loading More Posts
    • 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 Former User last edited by

      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 Reply Quote 0
      • G
        goetz last edited by

        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 Reply Quote 0
        • ?
          A Former User last edited by

          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 Reply Quote 0
          • First post
            Last post