zoukankan      html  css  js  c++  java
  • QT界面开发-使用new QComboBox添加触发事件

     1     //创建QComboBox控件
     2             m_comboBox = new QComboBox(ww);
     3             m_comboBox->setObjectName(GBK::ToUnicode(sheet1Ini));
     4             m_comboBox->setGeometry(0, 0, 100, 20);
     5             m_comboBox->setFont(font);
     6             m_comboBox->move(150, ((i - 3) * 30) + 0);
     7             for (int j = 0; j < choiseData.size(); j++)
     8             {
     9                 m_comboBox->addItem(GBK::ToUnicode(choiseData[j].c_str()));
    10             }
    11             m_comboBox->setCurrentIndex(defaultValue);        
    12             m_comboBox->show();
    13             connect(m_comboBox, SIGNAL(currentIndexChanged(const QString)), this, SLOT(m_open(const QString)));
    1 int NewEdgewinDesignTest::m_open(const QString &text)
    2 {
    3     QMessageBox::warning(this, "error", text);
    4     return 0;
    5 }

  • 相关阅读:
    css基础1
    js基础
    定位与浮动
    最新学习
    前端初学第一天
    js2
    js1
    html加css
    js三元表达式
    java script的学习
  • 原文地址:https://www.cnblogs.com/nxopen2018/p/12206548.html
Copyright © 2011-2022 走看看