Skip to content

Instantly share code, notes, and snippets.

View gokmen's full-sized avatar
🎯
Focusing

Gokmen Goksel gokmen

🎯
Focusing
View GitHub Profile
@gokmen
gokmen / dllmain.cpp
Created May 18, 2012 22:11
If you ever need a QApplication mainloop in a DLL u can use following header concept for your DLL.
static QApplication* app;
static int argc = 0;
BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID lpReserved)
{
switch (reason)
{
case DLL_PROCESS_ATTACH:
{
app = new QApplication(argc, NULL);
@gokmen
gokmen / main.cpp
Created April 30, 2012 14:16
If you have trouble with QWebView and SSL errors you can ignore SSL errors to render page correctly.
#include <QDebug>
#include <QWidget>
#include <QNetworkReply>
#include <QSslConfiguration>
App::App(QWidget *parent) :
QWidget(parent),
ui(new Ui::App)
{
ui->setupUi(this);