mirror of
https://github.com/x-tools-author/x-tools.git
synced 2025-09-15 15:28:40 +08:00
chore: update the file
This commit is contained in:
parent
04165687f3
commit
319d785b9a
@ -269,6 +269,7 @@ if(NOT QT_VERSION VERSION_LESS "6.8.0")
|
||||
set(X_APPS "xTools")
|
||||
list(APPEND X_APPS "xSvg")
|
||||
list(APPEND X_APPS "xCode")
|
||||
list(APPEND X_APPS "xDemo")
|
||||
list(APPEND X_APPS "xHash")
|
||||
list(APPEND X_APPS "xPing")
|
||||
list(APPEND X_APPS "xDebug")
|
||||
|
||||
@ -42,6 +42,9 @@ xUi::xUi(QWidget *parent)
|
||||
{
|
||||
winId(); // Ensure the window is created before moving it to the center
|
||||
initMenuBar();
|
||||
#ifdef X_MAGIC
|
||||
setWindowOpacity(0.3);
|
||||
#endif
|
||||
}
|
||||
|
||||
xUi::~xUi() {}
|
||||
|
||||
@ -31,6 +31,8 @@ protected:
|
||||
QMenu *m_viewMenu{nullptr};
|
||||
QMenu *m_helpMenu{nullptr};
|
||||
|
||||
QMenu *m_languageMenu{nullptr};
|
||||
|
||||
private:
|
||||
void initMenuBar();
|
||||
void initMenuBarOption();
|
||||
|
||||
26
xapps/xdemo/src/main.cpp
Normal file
26
xapps/xdemo/src/main.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
#/***************************************************************************************************
|
||||
* Copyright 2025-2025 x-tools-author(x-tools@outlook.com). All rights reserved.
|
||||
*
|
||||
* The file is encoded using "utf8 with bom", it is a part of xTools project.
|
||||
*
|
||||
* xTools is licensed according to the terms in the file LICENCE(GPL V3) in the root of the source
|
||||
* code directory.
|
||||
**************************************************************************************************/
|
||||
#include <QApplication>
|
||||
#include <QMainWindow>
|
||||
#include <QMenuBar>
|
||||
#include <QStyleHints>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
a.styleHints()->setColorScheme(Qt::ColorScheme::Dark);
|
||||
QMainWindow w;
|
||||
w.setMenuBar(new QMenuBar(&w));
|
||||
w.menuBar()->addMenu("File");
|
||||
w.setWindowTitle("xDemo Application");
|
||||
w.resize(800, 600);
|
||||
w.setWindowFlags(w.windowFlags() | Qt::ExpandedClientAreaHint);
|
||||
w.show();
|
||||
return a.exec();
|
||||
}
|
||||
4
xapps/xdemo/xDemo.cmake
Normal file
4
xapps/xdemo/xDemo.cmake
Normal file
@ -0,0 +1,4 @@
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${X_BIN}/xDemo)
|
||||
qt_add_executable(xDemo ${CMAKE_CURRENT_LIST_DIR}/src/main.cpp)
|
||||
x_deploy_qt(xDemo)
|
||||
target_link_libraries(xDemo PRIVATE Qt6::Core Qt6::Gui Qt6::Svg Qt6::Widgets)
|
||||
Loading…
Reference in New Issue
Block a user