Skip to content

Instantly share code, notes, and snippets.

seyedmmousavi / Qt5.15 configure options
Created April 1, 2023 17:33 — forked from h3ssan/Qt5.15 configure options
Qt 5.15 available configure options
View Qt5.15 configure options
Usage: configure [options] [assignments]
Configure understands variable assignments like VAR=value on the command line.
Each uppercased library name (obtainable with -list-libraries) supports the
_LIBS, and - on Windows and Darwin - _LIBS_DEBUG and _LIBS_RELEASE. E.g.,
ICU_PREFIX=/opt/icu42 ICU_LIBS="-licui18n -licuuc -licudata".
It is also possible to manipulate any QMAKE_* variable, to amend the values
from the mkspec for the build of Qt itself, e.g., QMAKE_CXXFLAGS+=-g3.
seyedmmousavi / embbeding_ca_cert_into_qt.cpp
Created October 3, 2021 17:08
Embedding Let's Encrypt CA root certificate into Qt application
View embbeding_ca_cert_into_qt.cpp
#include <QtNetwork/QSslConfiguration>
#include <QtNetwork/QSslSocket>
#include <QtGlobal>
//more includes...
int main(int argc, char *argv[])
//Adding CA root certificate of the Let'sEncrypt into default CA DB
//for Qt 5.15+
seyedmmousavi /
Last active March 30, 2020 11:32
Print Struct with field names in Golang?

To print a vriable of struct, just use Printf as follow

fmt.Printf(">RESULT: %+v \n", ticket)

This prints following output:

>RESULT: {Id:987654345 Title:ASEMAN Date:0 PlaceId:123 OwnerId:12345412312 IsActivated:true IsDeleted:false EditorId:0}

seyedmmousavi / exec-sqlite-sql-file-in-qt
Created January 9, 2017 18:10
Execute Sqlite query file (.sql) in Qt
View exec-sqlite-sql-file-in-qt
* @brief executeQueryFile
* Read a query file and removes some unnecessary characters/strings such as comments,
* and executes queries.
* If there is possible to use Transaction, so this method will uses it.
* Use this gist as MIT License.
* Feel free to use this gist as you like without any restriction,
* if you or your country are a member of The Axis of Resistance
* (Iran + Syria + Lebanon + Russia + Iraq + Yemen + Bahrain + Palestine)