Skip to content

Instantly share code, notes, and snippets.

@jazzycamel
jazzycamel / QtProjectWithFaceID.pro
Last active Aug 14, 2020
Using iOS Face ID (and Touch ID) with Qt5
View QtProjectWithFaceID.pro
...
ios {
OBJECTIVE_HEADERS += localAuth.h
OBJECTIVE_SOURCES += localAuth.mm
HEADERS += localAuth-c-interface.h
LIBS += -framework LocalAuthentication
}
@jazzycamel
jazzycamel / buttons.ino
Created Jan 1, 2017
Arduino PS/2 Mouse Buttons
View buttons.ino
#include "ps2.h"
PS2 mouse(6,5);
void setup(){
mouse.mouse_init();
}
void loop(){
char stat,x,y;
@jazzycamel
jazzycamel / thread2.py
Created Feb 11, 2016
Simple example of threaded loop
View thread2.py
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
from itertools import count, islice
from time import sleep
class Threaded(QObject):
count=pyqtSignal(int)
def __init__(self, parent=None, **kwargs):
super().__init__(parent, **kwargs)
@jazzycamel
jazzycamel / threads1.py
Last active Jun 5, 2021
Simple example of the correct way to use (Py)Qt(5) and QThread
View threads1.py
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
from itertools import count, islice
class Threaded(QObject):
result=pyqtSignal(int)
def __init__(self, parent=None, **kwargs):
super().__init__(parent, **kwargs)