原创 QT 自定義QPushButton,可以定製左右鍵彈出菜單

/// @file NPushButtonExtend.h /// @brief QPushButton擴展 /// @author [email protected] /// @date 2018 #ifndef N

原创 QT TcpSocket 客戶端封裝

#ifndef XSOCKETCLIENT_H #define XSOCKETCLIENT_H #include <QTcpSocket> #include <QTcpServer> class XSocketClient : p

原创 QT QWidget接受拖拽文件封裝

#ifndef XDROPFILEWIDGET_H #define XDROPFILEWIDGET_H #include <QWidget> class XDropFileWidget : public QWidget {

原创 QT 無邊框QWidget標題欄封裝

XTitleWidget.h文件 #ifndef XTITLEWIDGET_H #define XTITLEWIDGET_H #include <QFrame> namespace Ui { class XTitleWidget;

原创 VtkImageData轉爲RGBA格式

///對數據的區間進行限制 template<class F> inline F TP_LimitNum(F x, F xmin, F xmax) { x = (x > xmin ? x : xmin); x = (x < xm

原创 VTK漢字顯示問題

轉自 https://blog.csdn.net/xlong_t/article/details/41646041做項目需要用到VTK的漢字顯示功能,經過筆者多日調試,最後找到了一個非常簡單的解決方法。文章首發:http://blog.c

原创 QT 獲取文件的版本號

QString getFileVertion( QString fullName ) { QString result = ""; char* pData = nullptr; do {

原创 VTK 獲取三角形的面積

double getArea(double pt1[3], double pt2[3], double pt3[3]) { vtkSmartPointer<vtkPoints> points = vtkSmartPointer<v

原创 android開發工具大全

網址: http://www.androiddevtools.cn/

原创 使用vtk用到的頭

使用VTK時出錯,需要在包含其它VTK頭文件之前加入如下定義: #include <vtkAutoInit.h> VTK_MODULE_INIT(vtkRenderingVolumeOpenGL2) #define vtkRenderi

原创 vtk 將點用線連接起來顯示

vtkPoints *pPoints = vtkPoints::New(); //此處構建pPoints數據 vtkPolyLine *polyLine = vtkPolyLine::New(); polyLine->GetPointI

原创 使用QT Dicom轉換保存到JPEG

       功能的實現,使用了DcmTK庫(http://www.dcmtk.org/) QString filePath = "c://a.dcm"; QByteArray szfile = QFil

原创 QT 讀取和寫入註冊表

#include <QSettings> #define RUN_KEY "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\windows\\CurrentVersion\\run"

原创 房屋圖片