Class inheritace issue - syntax error

I am hacking existing python code - my first project.
I am following a simple tutorial to add / make tab dialog.

Even after adding the “from … import” ( not covered in tutorial ) to the module I keep getting "invalid syntax " .

I am using Linux / Eclipse /python3.7 and my hacked code, which uses PyQt5 generally works. .

from PyQt5 import QtWidgets
from PyQt5.QtWidgets import QApplication, QWidget, QInputDialog, QLineEdit, QPushButton, QLabel,QDialog
import sys
class TabDialog : public  QDialog

    explicit TabDialog(const QString &fileName, QWidget *parent = nullptr);

    QTabWidget *tabWidget;
    QDialogButtonBox *buttonBox;

  File "/media/z/DEV_COPY_LABEL/ECLIPSE_FOLDER/Eclispe_WORK_724/workspace/work_python_727/nanovna-saver_728/NanoVNASaver/Widgets/CCC_Widgets/", line 47
    class TabDialog : public  QDialog
SyntaxError: invalid syntax

The caret ‘^’ is actually pointing / located under “public”

Hey @anneranch24425664 welcome to the forum.

The code you’ve posted contains C++ code which is invalid Python. For example the line it is complaining about

class TabDialog : public  QDialog

…would be…

class TabDialog(QDialog):

in Python. Everything after that (the public and private sections) are not required in Python so can be deleted completely.

Can you post a link to where you got the code from? It should be possible to convert it to Python.