Solved QDial pointer mismatch
-
Hi,
Issue in Qt 5.14, but working fine in Qt 5.7 with same code.
While using QDial, the pointer is changing while running our application. See the image
The green marked are in our project where I have added QDial in a qwidget class and added that widget in a dockwidget.
In the form preview the pointer is round, but in the output pointer is different.
Not able to understand, maybe because of the stylesheet in our application or something else?
Any suggestion is appreciated.
In another separate app(QMainwindow - red mark), the output is proper.output in Qt 5.7
Regards,
Sayan -
Hi
I think its related to platform styles and fusion
and perhaps the app load other style on start.like
QApplication::setStyle(QStyleFactory::create("Fusion")); -
Hi
So in Design it looks like this
but when you run it looks like
or what do yo u mean by " the pointer is changing while running our application"
-
@mrjj no...just the opposite.
"or what do yo u mean by " the pointer is changing while running our application"" - Yes.The strange part is , if I try an example with QMainwindow app and add QDial and run it...the output correct as marked with the red arrow.
But in our code base, in Designer the value-pointer is round, but on running the app it turns to be arrow. This is happening in 5.14.
But the same code base in 5.7, it's fine,ie the pointer is round as in the last image, ie Dialog with ROI width n height.Regards,
Sayan -
Hi
I think its related to platform styles and fusion
and perhaps the app load other style on start.like
QApplication::setStyle(QStyleFactory::create("Fusion")); -
@mrjj but why it's correct in Qt 5.7, with the same code
-
@sayan275 update to 14.2, there was a bug with stylesheet cascading in 5.7+ should be fixed in the latest LTS 5.12 and 5.14.2
-
@J-Hilk yes sure I'll try 5.14.2
-
@J-Hilk I tried with qt5.14.2, but it's the same.
-
I tried the above in main and it worked.
#include <QStyleFactory> ... QApplication a(argc, argv); a.setStyle(QStyleFactory::create("Fusion")); ...
Thanks and sorry for late reply.