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. Is it object oriented programming in C++?
Qt 6.11 is out! See what's new in the release blog

Is it object oriented programming in C++?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 280 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.
  • A Offline
    A Offline
    Azurusek
    wrote on last edited by
    #1

    I wrote a program in QT, unfortunately my programming knowledge is poor and I have to do a project, you have to help me. I am forced to create a project in object oriented C ++. I've watched a lot of tutorials on YouTube and programming looks like this there. All the code for pressing a button is written underneath it. Could this be called object oriented programming? All the variables are in the window's .h file along with the variables. If this is not object-oriented programming, please let me know how to divide these instructions into classes and methods. Thank you in advance for your help. https://pastebin.com/7qNSc5cZ

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

      Hi,

      Yes it can be called that. Note that you are doing one wrong thing: do not keep a member variable of QSqlDatabase type. It's explained why in the class documentation.

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

      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