旋光异构手吧 关注:31贴子:2,089
  • 16回复贴,共1

【Qt】Code recording

只看楼主收藏回复



IP属地:美国1楼2014-08-22 13:08回复
    CLASS QDir
    function:mkpath


    IP属地:美国本楼含有高级字体2楼2014-08-22 13:09
    回复
      CLASS QDir
      to show the absolutefilepath



      IP属地:美国本楼含有高级字体4楼2014-08-22 16:44
      回复
        File Operating
        write and read


        IP属地:美国本楼含有高级字体5楼2014-08-22 16:45
        回复
          Screenshots can do everything but paste codes


          IP属地:美国6楼2014-08-22 18:31
          回复
            #include <QCoreApplication>#include <QtDebug>#include <QString>#include <QFile>#include <QTextStream>
            void Write(QString filename){ QFile file(filename);
            if(!file.open(QFile::WriteOnly | QFile::Text)) { qDebug() << "open error"; return; } QTextStream out(&file); out << "hello world";
            file.flush(); file.close();}
            void Read(QString filename){ QFile file(filename);
            if(!file.open(QFile::ReadOnly | QFile::Text)) { qDebug() << "read error"; return; } QTextStream in(&file); QString mtext = in.readAll(); qDebug() << mtext;
            file.close();}
            int main(int argc, char *argv[]){ QCoreApplication a(argc, argv); QString filename = "F:/QT/123.txt";
            Write(filename); Read(filename);
            return a.exec();}


            IP属地:美国7楼2014-08-22 18:31
            回复
              Mother Du can paste everything but a carrige return!


              IP属地:美国8楼2014-08-22 18:34
              回复
                Video21 QTreeWidget
                how to build a QTreeWidget



                IP属地:美国本楼含有高级字体9楼2014-08-22 22:54
                回复
                  Containers
                  QList
                  QListIterator


                  IP属地:美国本楼含有高级字体10楼2014-08-24 22:56
                  回复
                    QMutableListIterator<T> allows you to iterate over a QList<T> (or a QQueue<T>) and modify the list. If you don*t want to modify the list (or have a const QList), use the slightly faster QListIterator<T> instead.


                    IP属地:美国本楼含有高级字体11楼2014-08-24 23:03
                    回复
                      QList<T>, QLinkedList<T>, and QVector<T> provide similar functionality. Here*s an overview:
                      For most purposes, QList is the right class to use. Its index-based API is more convenient than QLinkedList*s iterator-based API, and it is usually faster than QVector because of the way it stores its items in memory (see Algorithmic Complexity for details). It also expands to less code in your executable.
                      If you need a real linked list, with guarantees of constant time insertions in the middle of the list and iterators to items rather than indexes, use QLinkedList.
                      If you want the items to occupy adjacent memory positions, use QVector.


                      IP属地:美国本楼含有高级字体12楼2014-08-24 23:36
                      回复


                        IP属地:美国13楼2014-08-25 15:38
                        回复
                          QT tablewidget
                          http://blog.sina.com.cn/s/blog_6f95aee601013zlg.html


                          IP属地:美国本楼含有高级字体14楼2014-08-27 22:44
                          回复
                            x


                            IP属地:贵州来自Android客户端15楼2014-09-01 21:02
                            收起回复
                              这都是啥。。。实验室师兄也很推荐Qt,说编界面比C要好呢


                              IP属地:浙江来自Android客户端16楼2014-10-08 17:28
                              收起回复