#include "mainwindow.h" #include "ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); QLibrary library("GraphCore.dll"); if (!library.load()) qDebug() << library.errorString(); if (library.load()) qDebug() << "library loaded"; typedef DiagramWidget*(*createWidget)(void); createWidget cwf = (createWidget)library.resolve("createWidget"); if (cwf) { m_diagramWidget = cwf(); ui->horizontalLayout_2->addWidget(m_diagramWidget); } else { qDebug() << "Could not show widget from the loaded library"; } } MainWindow::~MainWindow() { delete ui; delete m_diagramWidget; } void MainWindow::on_goDrawFunction_clicked() { m_diagramWidget->drawFunc(ui->lineEdit->text()); }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)