setCursor(Qt::BlankCursor) not working
-
I'm using raspberry Pi 4, last bullseye implementation, Qt 6.7.0, QtCreator 13.0.0.
I need hide the cursor inside my QDialog window. I tried setCursor(Qt::blankCursor), but nothing happens.
Very intersting is when I use setCursor(Qt::waintCursor), it works very well.What must be happen?
Thanks -
I saw X11 have some standard cursos missing on lib. So I create a invisible cursor and set it on my dialog and its works very well.
// 1 + 1 = transparent
// 0 + 0 = black
// 1 + 0 = white
// 0 + 1 = invert (on windows)QImage imageBit(32,32, QImage::Format_Mono); imageBit.fill(Qt::color0); QImage imageMsk(32,32, QImage::Format_Mono); imageMsk.fill(Qt::color1); QBitmap bitmapBit = QBitmap::fromImage(imageBit); QBitmap bitmapMsk = QBitmap::fromImage(imageMsk); QCursor cursor = QCursor(bitmapBit, bitmapMsk, 47, 0); this->setCursor(cursor);
I don't know if this problem is on this distribution of rasberry bullseye 64bits operational system only. But anyway, it is working now
-
Hi,
You should provide a minimal compilable example that shows what happens.
-
@SGaist My project is a 3D printing light cure resin controller. In one screen it shows the menu, and on the other it shows a Frameless QDialog with the "layer" of projected light over the resin. So, it is interesting not have mouse pointer on it, to avoid "printing" an icon over the resin...
The project is too much big to put all here. I will create a QDialog example and will post here.Sorry by delay in reply messages, it is very frustrating wait 10minutes to may send another message.
-
I saw X11 have some standard cursos missing on lib. So I create a invisible cursor and set it on my dialog and its works very well.
// 1 + 1 = transparent
// 0 + 0 = black
// 1 + 0 = white
// 0 + 1 = invert (on windows)QImage imageBit(32,32, QImage::Format_Mono); imageBit.fill(Qt::color0); QImage imageMsk(32,32, QImage::Format_Mono); imageMsk.fill(Qt::color1); QBitmap bitmapBit = QBitmap::fromImage(imageBit); QBitmap bitmapMsk = QBitmap::fromImage(imageMsk); QCursor cursor = QCursor(bitmapBit, bitmapMsk, 47, 0); this->setCursor(cursor);
I don't know if this problem is on this distribution of rasberry bullseye 64bits operational system only. But anyway, it is working now
-