C++ (Qt)#include <QLineEdit> class RLineEdit: public QLineEdit{ Q_OBJECT public: RLineEdit(QWidget *parent = 0); { this->setStyleSheet("QLineEdit { border-radius: 5px; padding: 2px 2px; border: 1px groove gray;}"); }; ~RLineEdit(){};};
C++ (Qt)class MyClass;
C++ (Qt)#include <MyClass.h> //это будет в .cpp
C++ (Qt)RLineEdit::RLineEdit(QWidget *parent ): QLineEdit( parent ){ ...}
#ifndef RIZEKLINEEDIT_H#define RIZEKLINEEDIT_H#include "QLineEdit"class RizekLineEdit: public QLineEdit{ Q_OBJECTpublic: RizekLineEdit(QWidget *parent = 0); ~RizekLineEdit();};#endif
#include "RizekLineEdit.h";RizekLineEdit::RizekLineEdit(QWidget *parent ):QLineEdit(parent){ this->setStyleSheet("QLineEdit { border-radius: 5px; padding: 2px 2px; border: 1px groove gray;}");}RizekLineEdit::~RizekLineEdit(){}
C++ (Qt)#include "RizekLineEdit.h";