qcursor

How can I prevent transform cursor to SplitHCursor when it's under border between QHeaderView sections

天大地大妈咪最大 提交于 2020-01-07 09:28:11
问题 There are N columns with manual resizing width from left. Other columns widths are resizing only when columns with manual resizing are resizing. I need to prevent cursor icon changing when cursor is under borders of sections without manual resizing. What did I try to do. But this is work not very good. table_header_border.zip #include "mainwindow.h" #include "ui_mainwindow.h" const int N = 2; //============================================================================== int nWidth(const

Use custom image in QCursor

血红的双手。 提交于 2019-12-29 09:13:35
问题 I have a .bmp image that I would like to use as a cursor for my GUI. The QCursor Documentation suggests that this is possible ("To create a cursor with your own bitmap, either use the QCursor constructor which takes a bitmap and a mask or the constructor which takes a pixmap as arguments") but I can't seem to get it to work as I get 'TypeError: QCursor(): argument 1 has unexpected type 'str'' when I try to use the suggested module with my bitmap. How should this be done? Below is a code that

How to make a QLineEdit follow the cursor to show me its coordinates

风格不统一 提交于 2019-12-11 22:51:38
问题 I want my QWidget to show me the coordinates of my cursor when it's on the Image, I read that the best way is to use QLineEdit , but I didn't find how to use it to do so. How to initiate the QLineEdit and how to show it, in order that it follows the cursor ? PS : I know how to set the points coordinates on it. this is how i'm doing it : void QImageWidget::mouseMoveEvent( QMouseEvent *event ){ int x = event->pos( ).x(); int y = event->pos( ).y(); if( cursorLineEdit != NULL && cursorLineEdit-