Ctrl-K - open the locator
F4 - switch header / source
F2 - follow symbol under cursor
Shift-F2 - switch between function definition/declaration
Ctrl-Shift-U - find usages
// QMake: QT += testlib | |
#include <QSignalSpy> | |
QSignalSpy spy(someObject*, &someClass::someSignal); | |
spy.wait(2000 /* Timeout ms */); |
Ctrl-K - open the locator
F4 - switch header / source
F2 - follow symbol under cursor
Shift-F2 - switch between function definition/declaration
Ctrl-Shift-U - find usages
Qt for Windows Deployment Tool
example:
C:\Qt\5.8\msvc2015_64\bin\windeployqt.exe C:\Development\qt\build-SomeApp-Binaries\SomeApp.exe
if you have qml, use --qmldir to point to where your .qml files are:
some of the keyboard shortcuts on Windows are actually very good.
This is an ettempt to emulate some of them on KDE
use system settings (aka configure desktop)
global keyboard shortcuts
kwin
// factorize() - factorize an integer into prime factors | |
std::vector<int> factorize(int n) { | |
std::vector<int> factors; | |
int maxFactor = std::sqrt(n); | |
for (int factor = 2; factor <= maxFactor; factor++) { | |
while (n % factor == 0) { | |
factors.push_back(factor); | |
n /= factor; | |
} |
in someheader.h (to be #included on the Qt/C++ side):
#include <QObject>
namespace SomeNamespace {
struct SomeViewControllerImpl;
// http://www.gofpatterns.com/design-patterns/module3/cplus-plus-singleton.php | |
class Singleton { | |
private: | |
static Singleton* theInstance; | |
protected: | |
Singleton(); | |
public: | |
static Singleton* getInstance(){ | |
if (theInstance == 0 ) { |
#ifndef IOSLocationServiceSingleton_H | |
#define IOSLocationServiceSingleton_H 1 | |
// locationservice.h : defines a CLLocationManager Singleton to share location services | |
@import Foundation; | |
@import CoreLocation; | |
@interface IOSLocationServiceSingleton : NSObject <CLLocationManagerDelegate> | |
+(IOSLocationServiceSingleton *) sharedInstance; |