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. Do the docs normally omit when a Qt Class inherits from classes in other libraries?
Qt 6.11 is out! See what's new in the release blog

Do the docs normally omit when a Qt Class inherits from classes in other libraries?

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

    I was sub-classing QException and implemented a what() method:

       virtual const QChar* what() const {
           return what_;
       }
    

    There was an error related to overriding a base class member. I checked the docs for QException and found no "inherets" entry. I also found no what() method listed under "List of All Members, including inherited members". When I went back to Qt Creator and followed the error to the original defintion, it pointed to std::exception. In the source code for QException, I see that QException does in fact inherit from std::exception.

    Not a hard problem to solve on my end, but it did catch me by surprise and got me thinking - when Qt classes inherit from something outside the framework, do the docs say so, or are the methods ever included under the list of inherited methods?

    1 Reply Last reply
    0
    • Kent-DorfmanK Offline
      Kent-DorfmanK Offline
      Kent-Dorfman
      wrote on last edited by
      #2

      I think the answer for your observation is, yes, they omit that information.

      The dystopian literature that served as a warning in my youth has become an instruction manual in my elder years.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        Good question, I would recommend bringing it to the interest mailing list. You'll find there Qt's developers/maintainers. This forum is more use oriented.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        YosemiteY 1 Reply Last reply
        2
        • SGaistS SGaist

          Hi,

          Good question, I would recommend bringing it to the interest mailing list. You'll find there Qt's developers/maintainers. This forum is more use oriented.

          YosemiteY Offline
          YosemiteY Offline
          Yosemite
          wrote on last edited by Yosemite
          #4

          @SGaist Ooh, cool. Thanks!

          I searched the qtbase git repo for "public std::" and "private std::" which ought to show classes that inherit from std classes at least. It looks like QException truly is exceptional in this case! It was the only Qt class I could find that used a std base class.

          1 Reply Last reply
          1

          • Login

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