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. Subclassing QTableView - Pure Virtual / Virtual
Forum Updated to NodeBB v4.3 + New Features

Subclassing QTableView - Pure Virtual / Virtual

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 586 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.
  • J Offline
    J Offline
    JahJerMar
    wrote on last edited by
    #1

    I'm a complete idiot but ... question. When subclassing... how do I know which methods need to be reimplemented... just the pure virtual methods or all virtual methods? I just wanted to have a sure-fire way of figuring out what will and won't work with just base constructor... I know you can view the qt source code and the classes via the website but I digress.

    Thanks in advance!

    raven-worxR VRoninV 2 Replies Last reply
    0
    • J JahJerMar

      I'm a complete idiot but ... question. When subclassing... how do I know which methods need to be reimplemented... just the pure virtual methods or all virtual methods? I just wanted to have a sure-fire way of figuring out what will and won't work with just base constructor... I know you can view the qt source code and the classes via the website but I digress.

      Thanks in advance!

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @JahJerMar
      pure virtual method for sure, otherwise you will encounter compiler errors anyway.
      virtual methods are meant to be overridden (if necessary). This mostly enables extending of the base functionality, but depends on the specific function.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      2
      • J JahJerMar

        I'm a complete idiot but ... question. When subclassing... how do I know which methods need to be reimplemented... just the pure virtual methods or all virtual methods? I just wanted to have a sure-fire way of figuring out what will and won't work with just base constructor... I know you can view the qt source code and the classes via the website but I digress.

        Thanks in advance!

        VRoninV Offline
        VRoninV Offline
        VRonin
        wrote on last edited by
        #3

        @JahJerMar said in Subclassing QTableView - Pure Virtual / Virtual:

        what will and won't work with just base constructor

        If you inherit public QTableView your class will work with exactly the same functionality

        "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
        ~Napoleon Bonaparte

        On a crusade to banish setIndexWidget() from the holy land of Qt

        J 1 Reply Last reply
        2
        • VRoninV VRonin

          @JahJerMar said in Subclassing QTableView - Pure Virtual / Virtual:

          what will and won't work with just base constructor

          If you inherit public QTableView your class will work with exactly the same functionality

          J Offline
          J Offline
          JahJerMar
          wrote on last edited by
          #4

          @VRonin said in Subclassing QTableView - Pure Virtual / Virtual:

          @JahJerMar said in Subclassing QTableView - Pure Virtual / Virtual:

          what will and won't work with just base constructor

          If you inherit public QTableView your class will work with exactly the same functionality

          That was exactly the answer to my question. Thanks I appreciate 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