Skip to content

Instantly share code, notes, and snippets.

View Avanznow's full-sized avatar
🎯
Focusing

Avanz Avanznow

🎯
Focusing
View GitHub Profile
import QtQuick 2.0
Rectangle {
id: page
width: 300
height: 350
color: "#acf4f7"
border.width: 0
x: 0
y: 0
#include "shakehands.h"
ShakeHands::ShakeHands(QObject *parent) :
QObject(parent)
{ updatecolor = 0;
}
@Avanznow
Avanznow / main
Created January 27, 2014 04:38
Signal Data Exchange in C++Qt/QML for Android/iOS/WP8
#include <QtGui/QGuiApplication>
#include "qtquick2applicationviewer.h"
#include <QtQuick/QQuickItem>
#include <QtQuick/QQuickView>
#include "shakehands.h"
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
# make
/opt/android-studio/ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -c -Wno-psabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -DANDROID -Wa,--noexecstack -std=gnu++0x -g -g -gdwarf-2 -marm -O0 -fno-omit-frame-pointer -Wall -Wno-psabi -W -D_REENTRANT -fPIE -DQT_QUICK_LIB -DQT_QML_LIB -DQT_SQL_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/local/Qt-5.2.1/mkspecs/android-g++ -I. -I/usr/include/QtMultimediaKit -Isrc -I/usr/local/Qt-5.2.1/include -I/usr/local/Qt-5.2.1/include/QtQuick -I/usr/local/Qt-5.2.1/include/QtQml -I/usr/local/Qt-5.2.1/include/QtSql -I/usr/local/Qt-5.2.1/include/QtNetwork -I/usr/local/Qt-5.2.1/include/QtGui -I/usr/local/Qt-5.2.1/include/QtCore -I. -I/opt/android-studio/ndk/sources/cxx-stl/gnu-libstdc++/4.8/include -I/opt/android-studio/ndk/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include -I/opt/android-studio/ndk/platforms/android-19/arch-arm/usr/include
r# ./configure
Generating translations ...
Updating '/home/xtool/Desktop/cellar/cellardoor/celladoor_fr_FR.qm'...
Generated 45 translation(s) (45 finished and 0 unfinished)
Updating '/home/xtool/Desktop/cellar/cellardoor/celladoor_de_DE.qm'...
Generated 45 translation(s) (34 finished and 11 unfinished)
Updating '/home/xtool/Desktop/cellar/cellardoor/celladoor_it_IT.qm'...
Generated 45 translation(s) (44 finished and 1 unfinished)
Warning: dropping duplicate messages in '/home/xtool/Desktop/cellar/cellardoor/celladoor_pt_BR.qm':
# lrelease -v
Usage:
lrelease [options] project-file
lrelease [options] ts-files [-qm qm-file]
lrelease is part of Qt's Linguist tool chain. It can be used as a
stand-alone tool to convert XML-based translations files in the TS
format into the 'compiled' QM format used by QTranslator objects.
Options:
@Avanznow
Avanznow / clicked-button
Last active January 3, 2016 01:39
Android iOS cross-mobile Qt/QML signal button to C++
/*
Copyright (C) 2014 Adrian Silva <http://avanznow.wordpress.com/contact>
This program is free software; you can redistribute it and/or
modify it under the terms of the New BSD Berkeley Software Distribution License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the BSD General Public
License for more details. - http://opensource.org/licenses/BSD-3-Clause
https://www.freebsd.org/doc/en_US.ISO8859-1/articles/bsdl-gpl/article.html
*/
$ git clean -dfx
Removing .qmake.cache
Removing Makefile
Removing android-libcellar.so-deployment-settings.json
Removing celladoor_de_DE.qm
Removing celladoor_es_ES.qm
Removing celladoor_fr_FR.qm
Removing celladoor_it_IT.qm
Removing celladoor_pt_BR.qm
Removing controller.o