diff --git a/limereport/lrreportdesignwidget.cpp b/limereport/lrreportdesignwidget.cpp index a96854d..b12ae6f 100644 --- a/limereport/lrreportdesignwidget.cpp +++ b/limereport/lrreportdesignwidget.cpp @@ -51,7 +51,12 @@ namespace LimeReport { ReportDesignWidget::ReportDesignWidget(ReportEnginePrivate *report, QMainWindow *mainWindow, QWidget *parent) : QWidget(parent), m_mainWindow(mainWindow), m_verticalGridStep(10), m_horizontalGridStep(10), m_useGrid(false) { +#ifdef HAVE_QT5 m_tabWidget = new QTabWidget(this); +#endif +#ifdef HAVE_QT4 + m_tabWidget = new LimeReportTabWidget(this); +#endif m_tabWidget->setTabPosition(QTabWidget::South); m_tabWidget->setMovable(true); connect(m_tabWidget->tabBar(), SIGNAL(tabMoved(int,int)), this, SLOT(slotTabMoved(int,int))); diff --git a/limereport/lrreportdesignwidget.h b/limereport/lrreportdesignwidget.h index a6dffe5..212dd19 100644 --- a/limereport/lrreportdesignwidget.h +++ b/limereport/lrreportdesignwidget.h @@ -42,6 +42,15 @@ #include "lrreportengine_p.h" #include "lrgraphicsviewzoom.h" +#ifdef HAVE_QT4 +QT_BEGIN_NAMESPACE +class LimeReportTabWidget: public QTabWidget{ +public: + explicit LimeReportTabWidget(QWidget *parent = 0):QTabWidget(parent){} + QTabBar* tabBar() const{ return QTabWidget::tabBar();} +}; +QT_END_NAMESPACE +#endif namespace LimeReport { @@ -158,7 +167,12 @@ private: QGraphicsView *m_view; QTextEdit* m_scriptEditor; QMainWindow *m_mainWindow; +#ifdef HAVE_QT5 QTabWidget* m_tabWidget; +#endif +#ifdef HAVE_QT4 + LimeReportTabWidget* m_tabWidget; +#endif GraphicsViewZoomer* m_zoomer; QFont m_defaultFont; int m_verticalGridStep;