Skip to content

Instantly share code, notes, and snippets.

@jazzycamel
jazzycamel / QtProjectWithFaceID.pro
Last active August 14, 2020 14:32
Using iOS Face ID (and Touch ID) with Qt5
...
ios {
OBJECTIVE_HEADERS += localAuth.h
OBJECTIVE_SOURCES += localAuth.mm
HEADERS += localAuth-c-interface.h
LIBS += -framework LocalAuthentication
}
@jazzycamel
jazzycamel / buttons.ino
Created January 1, 2017 13:22
Arduino PS/2 Mouse Buttons
#include "ps2.h"
PS2 mouse(6,5);
void setup(){
mouse.mouse_init();
}
void loop(){
char stat,x,y;
@jazzycamel
jazzycamel / thread2.py
Created February 11, 2016 11:09
Simple example of threaded loop
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 July 12, 2024 18:52
Simple example of the correct way to use (Py)Qt(5) and QThread
# Copyright (c) 2016 Rob Kent (jazzycamel)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software
# and associated documentation files (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge, publish, distribute,
# sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or
# substantial portions of the Software.