⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readdir.ui.h

📁 适合初学者学习的QT源程序
💻 H
字号:
/****************************************************************************** ui.h extension file, included from the uic-generated form implementation.**** If you want to add, delete, or rename functions or slots, use** Qt Designer to update this file, preserving your code.**** You should not define a constructor or destructor in this file.** Instead, write your code in functions called init() and destroy().** These will automatically be called by the form's constructor and** destructor.*****************************************************************************/#include <qdir.h>#include <qstring.h>void ReadDir::ShowDirList(){    enum MyDir    {	etc,	home,	bin,	proc,	dev,	lib,	usr,	tmp,    };        switch(ParentDir->currentItem())    {    case etc:	InsertItem("/etc");	break;    case home:	InsertItem("/home");	break;    case bin:	InsertItem("/bin");	break;    case proc:	InsertItem("/proc");	break;    case dev:	InsertItem("/dev");	break;    case lib:	InsertItem("/lib");	break;    case usr:	InsertItem("/usr");	break;    case tmp:	InsertItem("/tmp");	break;    }}void ReadDir::InsertItem( const QString &path ){    QDir DirPath(path);    for(int i=0;i<DirPath.count();i++)    {	if((DirPath[i] != ".") && (DirPath[i] != ".."))	{	    DirList->insertItem(DirPath[i]);	}    }    }void ReadDir::init(){    DirList->clear();    InsertItem("/etc");}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -