examples/script/context2d/window.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
   104 //! [1]
   104 //! [1]
   105     QDir dir(scriptsDir());
   105     QDir dir(scriptsDir());
   106     QFileInfoList entries = dir.entryInfoList(QStringList() << "*.js");
   106     QFileInfoList entries = dir.entryInfoList(QStringList() << "*.js");
   107     for (int i = 0; i < entries.size(); ++i)
   107     for (int i = 0; i < entries.size(); ++i)
   108         m_view->addItem(entries.at(i).fileName());
   108         m_view->addItem(entries.at(i).fileName());
   109     connect(m_view, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)),
   109     connect(m_view, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)),
   110             this, SLOT(selectScript(QListWidgetItem*)));
   110             this, SLOT(selectScript(QListWidgetItem*)));
   111 //! [1]
   111 //! [1]
   112 
   112 
   113     setWindowTitle(tr("Context 2D"));
   113     setWindowTitle(tr("Context 2D"));
   114 }
   114 }