Skip to content

Instantly share code, notes, and snippets.

View manashmandal's full-sized avatar
😭

Manash Kumar Mandal manashmandal

😭
View GitHub Profile
#ifndef THEWIDGETITEM_H
#define THEWIDGETITEM_H
#include <QWidget>
#include <QLineEdit>
#include <QPushButton>
#include <QSlider>
#include <QProgressBar>
#include <QLabel>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>TheWidgetItem</class>
<widget class="QWidget" name="TheWidgetItem">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>363</width>
<height>83</height>
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="2.0.0.0" processorArchitecture="x86" name="your_app_name_here.myapp" type="win32" />
<description> Your awesome app </description>
<dependency />
#include <windows.h>
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "AdminPriv.exe.manifest"
#-------------------------------------------------
#
# Project created by QtCreator 2016-03-30T21:02:34
#
#-------------------------------------------------
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AdminPriv</class>
<widget class="QWidget" name="AdminPriv">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>261</width>
<height>66</height>
#include "adminpriv.h"
#include "ui_adminpriv.h"
#include <QSettings>
#include <QDebug>
//Admin privilege checker string
#define ADMIN_TEST_STRING "HKEY_LOCAL_MACHINE"
#define ADMIN_DEFAULT_KEY "(Default)"
//If Admin privilege was activated or not
#include "qsettingsexample.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QSettingsExample w;
a.setApplicationName("Settings Example");
a.setOrganizationName("Electroscholars");
a.setOrganizationDomain("http://electroscholars.com");
#include "qsettingsexample.h"
#include "ui_qsettingsexample.h"
#define GROUP "settings_group"
#define KEY "key_for_value"
#define DEFAULT_VALUE "when_no_key_is_found_this_value_will_be_returned"
QSettingsExample::QSettingsExample(QWidget *parent) :
QDialog(parent),
ui(new Ui::QSettingsExample)
#include "qsettingsexample.h"
#include "ui_qsettingsexample.h"
QSettingsExample::QSettingsExample(QWidget *parent) :
QDialog(parent),
ui(new Ui::QSettingsExample)
{
ui->setupUi(this);
}