Skip to content

Commit

Permalink
add python demo test project
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-home committed Sep 20, 2017
1 parent fb2f15a commit 2b30e2f
Show file tree
Hide file tree
Showing 121 changed files with 13,480 additions and 1 deletion.
2 changes: 1 addition & 1 deletion LQFramKit
Submodule LQFramKit updated from c2824b to fac9f1
12 changes: 12 additions & 0 deletions LQSystemPathOP/.qmake.stash
@@ -0,0 +1,12 @@
QMAKE_DEFAULT_INCDIRS = \
C:/Qt/Qt5.7.0/Tools/mingw530_32/lib/gcc/i686-w64-mingw32/5.3.0/include \
C:/Qt/Qt5.7.0/Tools/mingw530_32/lib/gcc/i686-w64-mingw32/5.3.0/include-fixed \
C:/Qt/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include \
C:/Qt/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/c++ \
C:/Qt/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/c++/i686-w64-mingw32 \
C:/Qt/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/c++/backward
QMAKE_DEFAULT_LIBDIRS = \
C:/Qt/Qt5.7.0/Tools/mingw530_32/lib/gcc/i686-w64-mingw32/5.3.0 \
C:/Qt/Qt5.7.0/Tools/mingw530_32/lib/gcc \
C:/Qt/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/lib \
C:/Qt/Qt5.7.0/Tools/mingw530_32/lib
39 changes: 39 additions & 0 deletions LQSystemPathOP/LQSystemPathOP.pro
@@ -0,0 +1,39 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-09-16T19:30:55
#
#-------------------------------------------------

QT += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = LQSystemPathOP
TEMPLATE = app

DEFINES +=DEBUG_OUT

win32{
CONFIG += debug_and_release
CONFIG(release, debug|release) {
target_path = build_/release
TARGET = release/LQSystemPathOP
} else {
target_path = build_/debug
TARGET = debug/LQSystemPathOP
}
DESTDIR = bin
MOC_DIR = $$target_path/moc
RCC_DIR = $$target_path/rcc
UI_DIR = $$target_path/ui
OBJECTS_DIR = $$target_path/obj
}

DEPENDPATH += bin

SOURCES += main.cpp\
widget.cpp

HEADERS += widget.h

FORMS += widget.ui
11 changes: 11 additions & 0 deletions LQSystemPathOP/main.cpp
@@ -0,0 +1,11 @@
#include "widget.h"
#include <QApplication>

int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Widget w;
w.show();

return a.exec();
}
28 changes: 28 additions & 0 deletions LQSystemPathOP/widget.cpp
@@ -0,0 +1,28 @@
#include "widget.h"
#include "ui_widget.h"

#include <QProcess>

#include <QDebug>

Widget::Widget(QWidget *parent) :
QWidget(parent),
ui(new Ui::Widget)
{
ui->setupUi(this);

QStringList environment = QProcess::systemEnvironment ();
QString str;
foreach (str, environment) {
//if (str.startsWith ("PATH="))
{
qDebug()<<str<<endl;
//break;
}
}
}

Widget::~Widget()
{
delete ui;
}
22 changes: 22 additions & 0 deletions LQSystemPathOP/widget.h
@@ -0,0 +1,22 @@
#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>

namespace Ui {
class Widget;
}

class Widget : public QWidget
{
Q_OBJECT

public:
explicit Widget(QWidget *parent = 0);
~Widget();

private:
Ui::Widget *ui;
};

#endif // WIDGET_H
20 changes: 20 additions & 0 deletions LQSystemPathOP/widget.ui
@@ -0,0 +1,20 @@
<ui version="4.0">
<class>Widget</class>
<widget class="QWidget" name="Widget" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle" >
<string>Widget</string>
</property>
</widget>
<layoutDefault spacing="6" margin="11" />
<pixmapfunction></pixmapfunction>
<resources/>
<connections/>
</ui>
40 changes: 40 additions & 0 deletions PythonQtDemo/PythonQtDemo.pro
@@ -0,0 +1,40 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-09-20T19:40:30
#
#-------------------------------------------------

QT += core

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = PythonQtDemo
TEMPLATE = app

CONFIG += console
CONFIG -=app_bundle

win32{
CONFIG += debug_and_release
CONFIG(release, debug|release) {
target_path = build_/release
TARGET = /release/PythonQtDemo
} else {
target_path = build_/debug
TARGET = /debug/PythonQtDemo
}
DESTDIR = bin
MOC_DIR = $$target_path/moc
RCC_DIR = $$target_path/rcc
UI_DIR = $$target_path/ui
OBJECTS_DIR = $$target_path/obj
}

DEPENDPATH += bin


INCLUDEPATH += $$PWD/include

LIBS += -L$$PWD/libs/ -lpython27

SOURCES += main.cpp
2 changes: 2 additions & 0 deletions PythonQtDemo/bin/debug/test_python.py
@@ -0,0 +1,2 @@
def helloworld():
print("hello world!")
2 changes: 2 additions & 0 deletions PythonQtDemo/bin/release/test_python.py
@@ -0,0 +1,2 @@
def helloworld():
print("hello world!")

0 comments on commit 2b30e2f

Please sign in to comment.