iobjects c++ win10
文件型
在创建了一个工作空间,打开了一个数据源的前提下,如何让数据源中的数据显示在窗口上;
新建数据源总是不能成功
QString path = QFileDialog::getSaveFileName(this, QStringLiteral("新建数据源"), "C:/", tr("udb(*.udb)"));
UGDsConnection *dc = new UGDsConnection();
dc->m_nType = UGC::UDB;
dc->m_bReadOnly = false;
dc->m_bAutoConnect = true;
dc->m_strServer = Translator::QStr2UGStr(path);
dc->m_strAlias = Translator::QStr2UGStr("one");
UGDataSource *ds = new UGDataSource(); //如何与连接信息关联????
if(ds->Create())
{
QMessageBox::critical(this, "error", QStringLiteral("数据源创建"));
workspace->SetSaveResources(true);
}
else
{
QMessageBox::critical(this, "error", QStringLiteral("数据源创建失败"));
}