1
0
mirror of https://gitee.com/drabel/LibQQt.git synced 2025-01-04 10:18:44 +08:00

79 lines
2.0 KiB
C++
Raw Normal View History

#include "mainwindow.h"
#include <QApplication>
2017-11-23 12:33:32 +08:00
#include "qqtobjectfactory.h"
#include "qqtcore.h"
2017-11-23 19:12:48 +08:00
#include "qqthttpdownloadmanager.h"
#include "qqtapplication.h"
#include "qqtqtiowebpageparser.h"
2017-11-24 19:43:36 +08:00
#include "qqtdictionary.h"
2017-11-23 12:33:32 +08:00
int main ( int argc, char* argv[] )
{
2017-11-23 19:12:48 +08:00
QQtApplication a ( argc, argv );
2017-11-23 12:33:32 +08:00
2017-11-23 19:12:48 +08:00
/*
2017-11-23 12:33:32 +08:00
QQtWidgetFactory::registerObject<QPushButton>();
QObject* obj = QQtWidgetFactory::createObject ( "QPushButton" );
pline() << obj->inherits ( "QWidget" );
pline() << obj->inherits ( "QPushButton" );
pline() << obj->inherits ( "QObject" );
obj->setObjectName ( "bbb" );
pline() << obj->objectName();
QQtObjectParcel::registerObject ( obj );
2017-11-23 19:12:48 +08:00
*/
2017-11-23 12:33:32 +08:00
2017-11-24 19:43:36 +08:00
//QQtQtIOWebPageParser webparser;
//webparser.startNewParse ( );
2017-11-23 12:33:32 +08:00
2017-11-23 19:12:48 +08:00
//MainWindow w;
//w.show();
2017-11-24 22:43:12 +08:00
QQtDict d0;
d0["cc"] = "dd";
qDebug() << d0["cc"].getValue();
2017-11-24 19:43:36 +08:00
2017-11-24 22:43:12 +08:00
QQtDict d1;
QQtDict d2 ( QVariant ( "CCCC" ) );
d1.appendValue ( d2 );
qDebug() << d1[0].getValue();
d1[0] = "ff";
qDebug() << d1[0].getValue();
QQtDict d3;
d3["cc"]["dd"] = "ee";
qDebug() << d3["cc"]["dd"].getValue().toString();
QQtDict d4;
for ( int i = 0; i < 5; i++ )
{
QQtDict d ( QVariant ( QString::number ( i ) ) );
d4.appendValue ( d );
}
qDebug() << d4.count();
for ( int i = 0; i < d4.count(); i++ )
{
qDebug() << d4[i].getValue().toString();
}
QQtDict d5;
d5.appendChild ( "5.7" );
d5.appendChild ( "5.8" );
d5.appendChild ( "5.9" );
d5["5.7"].appendChild ( "5.7.2" );
d5["5.7"].appendChild ( "5.7.3" );
d5["5.7"].appendChild ( "5.7.4" );
d5["5.7"]["5.7.4"].appendChild ( "xxx.dmg" );
d5["5.7"]["5.7.4"]["xxx.dmg"].appendValue ( "xxx.dmg" );
d5["5.7"]["5.7.4"]["xxx.dmg"].appendValue ( "2017-12-12" );
d5["5.7"]["5.7.4"]["xxx.dmg"].appendValue ( "1.2G" );
d5["5.7"]["5.7.4"]["xxx.dmg"].appendValue ( "Detail" );
pline() << "\n" << d5["5.7"]["5.7.4"];
return 0;//a.exec();
}