qcustomplot繪制數(shù)據(jù)點(diǎn) qcustomplot在linux能實(shí)現(xiàn)嗎?
qcustomplot在linux能實(shí)現(xiàn)嗎?在應(yīng)用程序中使用qcustomplot有兩種方法:1。下載qcustomplot。H和qcustomplot.cpp文件加入你的項(xiàng)目。在要使用qcustom
qcustomplot在linux能實(shí)現(xiàn)嗎?
在應(yīng)用程序中使用qcustomplot有兩種方法:1。下載qcustomplot。H和qcustomplot.cpp文件加入你的項(xiàng)目。在要使用qcustomplot:[CPP]viewplan input print的文件中?#包括“qcustomplot。然后像QWidget一樣使用它
mouseevent->pos()可以得到相對于viewport()的坐標(biāo)POS,然后Size1=customplot->viewport()。Size()size2=customplot->axisrect()->size()和pos-(size1-size2)/2,您可以獲得鼠標(biāo)單擊位置的坐標(biāo)
這取決于您設(shè)置的快捷鍵。有時(shí)如果快捷鍵沖突,按快捷鍵將不會產(chǎn)生相應(yīng)的效果。你可以參考我的設(shè)置來修改這個(gè)的快捷鍵。設(shè)置→鍵映射→在輸入框中輸入環(huán)繞聲→查找環(huán)繞聲→修改右側(cè)的快捷鍵。如果不使用快捷鍵,可以使用下面的圖像。
QCustomPlot怎么獲取圖像中的點(diǎn)對應(yīng)當(dāng)前坐標(biāo)軸的坐標(biāo)?
所以有兩種實(shí)現(xiàn)方法:
我們只需要使用父控件實(shí)現(xiàn)slot函數(shù)來綁定這些信號進(jìn)行特定的處理
實(shí)現(xiàn)qcustomplot的子類,重載鼠標(biāo)事件函數(shù),如鼠標(biāo)按下、移動(dòng)、釋放等