下面為一個簡單UI設計
1. 利用Claude,透過它快速得到一個漂亮的範例(python程式碼)
2. 利用Claude,抽取python程式碼中GUI相關程式碼並輸出成Qt Designer可以編輯ui格式

me1237guy 發表在 痞客邦 留言(0) 人氣()


1. 利用Designer設計一個人機介面,存成檔案 yolo_setting.ui

me1237guy 發表在 痞客邦 留言(0) 人氣()


加入一個繼承Object的新類別Test,
#ifndef
TEST_H

me1237guy 發表在 痞客邦 留言(0) 人氣()


 
點選Download Qt

me1237guy 發表在 痞客邦 留言(0) 人氣()

Qt6 QML Book

me1237guy 發表在 痞客邦 留言(0) 人氣()


QLibrary - import a class
透過QLibrary載入動態函式庫並利用Qt Plugin設計軟體插件
How to export C++ class from dll
C++ Qt 98 - How to use a DLL
c語言怎麼呼叫dll檔案

me1237guy 發表在 痞客邦 留言(0) 人氣()

 
This following tutorial helps you to create a library with Qt
How to create a library with Qt and use it in an application
 

me1237guy 發表在 痞客邦 留言(0) 人氣()


 
 
mainwindow.h
#ifndef MAINWINDOW_H


#define MAINWINDOW_H


 


#include <QMainWindow>


#include <QMenuBar>


#include <QToolBar>


#include <QAction>


#include <QGraphicsScene>


#include <QGraphicsView>


#include <QStatusBar>


#include <QLabel>


#include <QGraphicsPixmapItem>


#include <QFileDialog>


 


 


QT_BEGIN_NAMESPACE


namespace Ui { class MainWindow; }


QT_END_NAMESPACE


 


class MainWindow : public QMainWindow


{


 Q_OBJECT


 


public:


 MainWindow(QWidget *parent = nullptr);


 ~MainWindow();


 


private:


 void initUI();


 void createActions();


 void showImage(QString filePath);


 void setupShortcuts();


 


private slots:


 void openImage();


 


private:


 Ui::MainWindow *ui;


 QMenu *fileMenu;


 QMenu *viewMenu;


 


 QToolBar *fileToolBar;


 QToolBar *viewToolBar;


 


 QGraphicsScene *imageScene;


 QGraphicsView *imageView;


 


 QStatusBar *mainStatusBar;


 QLabel *mainStatusLabel;


 


 QAction *openAction;


 


 QString currentImagePath;


 QGraphicsPixmapItem *currentImage;


 


};


#endif // MAINWINDOW_H


me1237guy 發表在 痞客邦 留言(0) 人氣()

image
C++ Qt 82 - Custom QGraphicsItem
Qt C++ 02 Mouse Scrolling with Custom Graphics View
Qt Training: Graphics View (part 2/3): Transformations and Coordinate Systems

me1237guy 發表在 痞客邦 留言(0) 人氣()

image
This time we are going to create a new Object intead of using subclass of QThread,and all its job is transfer to a QThread instance by calling moveToThread method.You can find out details on youtube.
Let’s create a new project of window application and add new class, in which it accumaltes from 1 to 999. 

me1237guy 發表在 痞客邦 留言(0) 人氣()

image
A good example for writing QThread with a GUI.
Here is another similar example:QT5 TUTORIAL QTHREADS - GUI THREAD - 2020

me1237guy 發表在 痞客邦 留言(0) 人氣()

image
A good example that help you learn how to handle mouse events

me1237guy 發表在 痞客邦 留言(0) 人氣()

1 2
Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。