Qt两个控件的交互 10
主窗口有两个控件,一个是LayerList(里面有个QtreeView),另一个是Mapcanvas,下面代码为什么信号槽无响应?winMain::winMain(QWi...
主窗口有两个控件,一个是LayerList(里面有个QtreeView),另一个是 Mapcanvas,下面代码为什么信号槽无响应?
winMain::winMain(QWidget *parent)
: QMainWindow(parent)
{
ui.setupUi(this);
mpDataService = new DataService(this);
mpMapViews = new MapViews();
mpLayerList = new LayerList();
connect(mpLayerList->getTreeView(), SIGNAL(clicked(const QModelIndex & index)), mpMapViews, SLOT(on_TreeView_Clicked(const QModelIndex & index)));
} 展开
winMain::winMain(QWidget *parent)
: QMainWindow(parent)
{
ui.setupUi(this);
mpDataService = new DataService(this);
mpMapViews = new MapViews();
mpLayerList = new LayerList();
connect(mpLayerList->getTreeView(), SIGNAL(clicked(const QModelIndex & index)), mpMapViews, SLOT(on_TreeView_Clicked(const QModelIndex & index)));
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询