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

添加QVariant在嵌入式arm上测试以备给pictureeffecttabbar里面的QQtDictNode用

This commit is contained in:
tianduanrui 2017-12-27 14:13:21 +08:00
parent 22f72aa2e9
commit bede0d3d17
6 changed files with 137 additions and 3 deletions

View File

@ -1,7 +1,8 @@
TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS = src/qqt.pro
SUBDIRS = src/qqt.pro \
test/customqvariant
##-----------------------------------------------------------------
##basic example
@ -34,8 +35,7 @@ SUBDIRS = src/qqt.pro
##some test project
##-----------------------------------------------------------------
#SUBDIRS += test/gumbo_query_test
#
SUBDIRS += test/svgtest
#SUBDIRS += test/svgtest
#SUBDIRS += test/framelesshelperwidget
#SUBDIRS += test/treeviewtest
#SUBDIRS += test/qqtdicttest

View File

@ -0,0 +1,39 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-12-25T19:00:03
#
#-------------------------------------------------
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = customqvariant
TEMPLATE = app
# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += \
main.cpp \
mainwindow.cpp
HEADERS += \
mainwindow.h
FORMS += \
mainwindow.ui
CONFIG += mobility
MOBILITY =
include ($${PWD}/../../src/app_configure.pri)

View File

@ -0,0 +1,38 @@
#include "mainwindow.h"
#include <QApplication>
#include <QDebug>
typedef struct tagBtnIconTable2
{
QString pixmap[5];
tagBtnIconTable2() {}
QString pixMap ( int index ) {}
void setPixMap ( int index, QString pix ) {}
void initNormal ( QString normal, QString press ) {}
void initCheck ( QString uncheck, QString check ) {}
void initOther ( QString hover, QString disable ) {}
const QString& operator[] ( int index ) const {}
QString& operator [] ( int index ) {}
} TBtnIconTable2;
Q_DECLARE_METATYPE ( TBtnIconTable2 )
int main ( int argc, char* argv[] )
{
QApplication a ( argc, argv );
QVariant vv;
TBtnIconTable2 icc;
icc.pixmap[0] = "icon";
vv.setValue<TBtnIconTable2> ( icc );
qDebug() << vv.value<TBtnIconTable2>().pixmap[0];
//MainWindow w;
//w.show();
return 0;//a.exec();
}

View File

@ -0,0 +1,14 @@
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
MainWindow::~MainWindow()
{
delete ui;
}

View File

@ -0,0 +1,22 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private:
Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H

View File

@ -0,0 +1,21 @@
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>480</height>
</rect>
</property>
<property name="windowTitle" >
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralWidget" />
</widget>
<layoutDefault spacing="6" margin="11" />
<pixmapfunction></pixmapfunction>
<resources/>
<connections/>
</ui>