Select.h # ifndef SELECT_H # Define SELECT_H
#include
Class Form1: Public Qwidget {
public: Form1 (QWidget * parent = 0, const char * name = 0); QLabel * pixmapLabel; QLabel * textLabel; QPushButton * pushButton2; QPushButton * pushButton3; QPushButton * pushButton1; QListView * mw; private: QPixmap image0; public slots: Void getName (QlistViewItem *);
# endifselect.cpp (I am also putting main) #include
#include
TextLabel = new Qlabel (this "TextLabel"); TextLabel-> setGeometry (QRECT (58, 8, 200, 50)); TextLabel-> Settext (TR ("Learning Garden))); TextLabel-> setFont (QFont "Song Ti", 26, QFont :: bold); pushbutton1 = new qpushbutton (this, "pushbutton1"); pushbutton1-> setGeometry (qrect (230, 50, 91, 31)); pushbutton1-> settext (TR (TR) "Open")); pushbutton2 = new qpushbutton (this, "pushbutton2"); pushbutton2-> setGeometry (qrect (230, 120, 91, 31); pushbutton2-> settext (TR ("Add File"); Pushbutton3 = New Qpushbutton (this, "pushbutton3"); pushbutton3-> setGeometry (qRECT (230, 190, 91, 31); pushbutton3-> settext (Tr ("Remove File"); QlistView * MW = New QlistView (this , "Form1"); MW-> setGeometry (qrect (0, 60, 211, 250)); MW-> AddColumn (TR ("directory")); MW-> settreestepsize (20);
QDir D; D.SetPath ("/ Home / Pangdae / Study /"); D.SetFilter (0x002); const QfileInfolist * roots = D.EnTryInfolist (); QPTRListIterator
INT Main (int Argc, char * argv []) {qapplication app (argc, argv); app.setfont (QFont ("Song Ti", 12)); app.setdefaultcodec (QTextcodec :: CodecForname ("zh_cn.gb2312" ));