Qt QCustomPlot樣式設定

2021-10-14 07:15:23 字數 1332 閱讀 2252

qcustomplot *pcustomplot =

new qcustomplot;

//設定畫布背景色

pcustomplot-

>

setbackground

(qcolor(24

,47,81

));//設定座標名稱顏色

pcustomplot-

>xaxis-

>

setticklabelcolor

(qcolor

(146

,168

,204))

;//設定x座標名稱顏色

pcustomplot-

>yaxis-

>

setticklabelcolor

(qcolor

(146

,168

,204))

;//設定y座標名稱顏色

//設定座標線顏色

pcustomplot-

>xaxis-

>

setbasepen

(qcolor

(146

,168

,204))

;//設定x座標線顏色

pcustomplot-

>yaxis-

>

setbasepen

(qcolor

(146

,168

,204))

;//設定y座標線顏色

pcustomplot-

>xaxis-

>

settickpen

(qcolor

(146

,168

,204))

;//設定x座標線上大分格線顏色

pcustomplot-

>yaxis-

>

settickpen

(qcolor

(146

,168

,204))

;//設定y座標線上大分格線顏色

pcustomplot-

>xaxis-

>

setsubtickpen

(qcolor

(146

,168

,204))

;//設定x座標線上小分格線顏色

pcustomplot-

>yaxis-

>

setsubtickpen

(qcolor

(146

,168

,204))

;//設定y座標線上小分格線顏色

QT QcustomPlot初次使用

qt qcustomplot初次使用 qcustomplot是qt提供的小型第三方圖表庫,支援靜態 動態曲線 柱狀圖 蠟燭圖 頻譜圖等。使用方便,僅需在專案中加入標頭檔案qcustomplot.h和qcustomplot.cpp原始檔即可,或者把它當做乙個庫來新增到專案當中,需要在pro檔案加入 d...

Qt Qcustomplot座標軸縮放 拖動等調整

qcustomplot入門 qcustomplot入門教程 qcustomplot中可以設定座標軸屬性 1 setinteractions函式 設定基本座標軸 左側y軸和下方x軸 可拖動 可縮放 曲線可選 legend可選 設定伸縮比例,使所有圖例可見 customplot setinteracti...

CSS字型樣式,背景樣式,列表樣式

1.color 字型顏色 2.font size 字型大小 盡量用偶數 3.font family 字型型號 可以設定多個字型,用,隔開,優先使用第乙個字型,如果沒有使用下乙個。中文字型加引號,英文本型如果有空格 則也要加引號 線上字型 font face 4.font style 字型樣式 斜體等...