Qt Native Stye for macOS
-
I have noticed that when users use the Apple macOS system, they should experience some UI-widgets, such as combo-boxes, and message-boxes.
If the macOS developers chooses to use the Qt framework instead of the Swift framework because of its re-usability and code-simplicity, we will discover that some Qt widgets will not look like the same as the traditional native Swift UI widgets.For example,
QComboBox
vsNSComboBox
(menu).
The typical drop-down menu of SwiftUIKit.NSComboBox.menu
looks like this:
However, a native C++
Qt::QtWidgets::QCombBox::private::m_menu
may looks like this:For another example, a native
UIAlertControler
may look like this:On the other hand, a typical C++
Qt::QtWidgets::QMessageBox
will look like this:
My question is, are there any method to control and use the native format for the menus and messages and widgets, but not the Qt styling one?
/* my aim is not using these codes: QStyle style = QStyle(); style.setPalette(); style.asdfasdf(); ...;...; setStyle(style); */ QApplication::setNativeFormatStyle(true); // or QApplication::setAttribute(Qt::AA_MacMenusUseNative); QApplication::setAttribute(Qt::AA_MacMessageboxUseNativeInBigSur);
-
Hi,
One thing I am not sure about your comparison is that you are comparing a menu to a combo box drop-down. They are not the same thing so you should in fact compare it to QMenu.
As for the rest, I think bringing this to the
interest mailing list would be better as you'll find there Qt's developers/maintainers. This forum is more user oriented. -
-
Hi,
One thing I am not sure about your comparison is that you are comparing a menu to a combo box drop-down. They are not the same thing so you should in fact compare it to QMenu.
As for the rest, I think bringing this to the
interest mailing list would be better as you'll find there Qt's developers/maintainers. This forum is more user oriented.