mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Add a very experimental QT based runtime for pgAdmin 4.
This runtime implements a brower control with embedded Python interpretor. The Python interpretor runs a simple script at startup to generate some HTML that is displayed in the browser. Arbitrary URLs can be opened from the "Open URL" option on the File menu.
This commit is contained in:
45
runtime/pgAdmin4.cpp
Normal file
45
runtime/pgAdmin4.cpp
Normal file
@@ -0,0 +1,45 @@
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// pgAdmin 4 - PostgreSQL Tools
|
||||
//
|
||||
// Copyright (C) 2013, The pgAdmin Development Team
|
||||
// This software is released under the PostgreSQL Licence
|
||||
//
|
||||
// pgAdmin4.cpp - Main application entry point
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Must be before QT
|
||||
#include <Python.h>
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QtWidgets>
|
||||
#else
|
||||
#include <QApplication>
|
||||
#endif
|
||||
|
||||
#include "BrowserWindow.h"
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
// Create the QT application
|
||||
QApplication app(argc, argv);
|
||||
|
||||
// Initialise Python
|
||||
Py_SetProgramName(argv[0]);
|
||||
Py_Initialize();
|
||||
|
||||
// Create & show the main window
|
||||
BrowserWindow browserWindow;
|
||||
browserWindow.show();
|
||||
|
||||
// Go!
|
||||
return app.exec();
|
||||
|
||||
// Shutdown Python
|
||||
Py_Finalize();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user