Unsolved Splitter resize icon not shown
-
So you don't mean a QSplitter but the change of the mouse cursor when you want to resize the sections?
-
Yes, that is correct.
-
A quick check in designer preview I don't see such a behavior. Please write a small testcase to see if it really does not work on your system.
-
Are you applying a stylesheet?
-
No stylesheet. I did another test and commented out the line above and still no icon. So now it has nothing to do with that code, just for some reason that icon does not appear. Very strange. Is there some code I can write to force it?
-
Again: write a simple testcase to try to reproduce it.
-
Okay I figured out the problem but not sure why this would cause it. The problem has to do with starting and stopping the cursor;
This statement removes the resize icon from the splitter if I use it: All is in MainWindow.
QApplication::setOverrideCursor(Qt::WaitCursor); //shows wait spinner
QApplication::setOverrideCursor(Qt::ArrowCursor); //end wait spinnerThis code does not effect the resize icon:
this->setCursor(Qt::WaitCursor);
this->setCursor(Qt::ArrowCursor);Why would the setOverideCursor cause such a behavior?
-
In case someone ask the next logical question "why use the setOverrideCursor?" It is because sometimes the setCursor did not display the wait cursor as I expected where as the alternate did, but apparently it causes other issues :(
-
Hi,
Because you did not call restoreOverrideCursor once done with the code that required setOverrideCursor in the first place.
-
Well, I went back through all the code and did fine to starts which occurred back to back. So I modified the code to have a single start and right after a single end but still the same issue. I even tried using restoreOverrideCursor but still no good.
-
This seems to work but not sure if it is the correct way.
startCursor()
{
QApplication::setOverrideCursor(Qt::WaitCursor);}
-
Sorry for some reason the screen reset so I'll try again: This seems to work. Does it make sense?
startCursor()
{
QApplication::setOverrideCursor(Qt::WaitCursor);
}endCursor()
{
QApplication::restoreOverrideCursor();
QApplication::setOverrideCursor(Qt::ArrowCursor);
QApplication::restoreOverrideCursor();
}