Qt5中setCursor編譯報錯的解決

2021-07-26 09:40:42 字數 554 閱讀 6660

中因相容性存在setcursor錯誤,錯誤**如下

myitem::myitem()

產生了錯誤:

h:\qt\graphicsview01\graphicsview01\myitem.cpp:8: error: no matching function for call to 'myitem::setcursor(qt::cursorshape)'

setcursor(qt::openhandcursor);    ^

其解決辦法如下:

在myitem.cpp頭部加入

#include

的宣告,然後將:

setcursor(

qt::

openhandcursor

);//改變游標形

改為:

setcursor(qcursor(qt::openhandcursor));

//改變游標形狀

即可解決問題

Qt5 嵌入式裝置QT5動態庫編譯,QT5移植

perl 5.8 or later python 2.7 or later c compiler supporting the c 98 standard sdk提供 編譯套裝 sudo apt get install build essential sudo apt get install git...

Qt5編譯使用QFtp

git clone 完成之後,可以看到 qtftp 中包含原始碼及示例。下面,以 msvc為例。開啟 qtftp.pro,將預設配置 config static config shared 改為 config staticlib config shared 這樣,生成 dll的同時也會生成 lib。...

QT5下qwt編譯與使用

2.安裝配置好編譯環境。2.將此安裝包解壓。三 編譯 1.用qtcreator開啟 qwt 6.1.4 路徑下的工程檔案qwt.pro。2.根據自己安裝的qt版本 msvc或mingw等 選擇合適的編譯器編譯。4.編譯好之後,在qwt解壓的檔案所在路徑會新建乙個資料夾 build qwt deskt...