If you include QT in the Factory you loose the whole point
the point is to separate QT GUI from the program's logic
WidgetView is not a QWidget, but QTTextEdit which inherited from it IS
so I can.
this is strange, as the same code is working perfectly under Windows
I wrote a simplified program that show the problem:
#include <QtGui>
class CompView {
public:
virtual ~CompView() {}
virtual void eli() = 0;
};
class Comp
: public QTextEdit,
public CompView
{public:
void eli() {}
};
int main(int argc, char *argv[]) {
CompView* c = new Comp;
mw.show();
return app.exec();
}
#include <QtGui>
class CompView {
public:
virtual ~CompView() {}
virtual void eli() = 0;
};
class Comp : public QTextEdit, public CompView {
public:
void eli() {}
};
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
QMainWindow mw;
CompView* c = new Comp;
mw.setCentralWidget((QWidget*)c);
mw.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
when I run this I also get segmentation fault
Bookmarks