[GH-ISSUE #73] Add support for QApplication. #47

Closed
opened 2026-05-05 11:01:13 -06:00 by gitea-mirror · 13 comments
Owner

Originally created by @Nihlus on GitHub (Sep 25, 2018).
Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/73

According to these docs, native look and feel is possible with QML, but only using QApplication and not QGuiApplication.

http://doc.qt.io/qt-5/qtquickcontrols-overview.html

Is this slated to be added to QML.Net?

Originally created by @Nihlus on GitHub (Sep 25, 2018). Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/73 According to these docs, native look and feel is possible with QML, but only using QApplication and not QGuiApplication. http://doc.qt.io/qt-5/qtquickcontrols-overview.html Is this slated to be added to QML.Net?
Author
Owner

@pauldotknopf commented on GitHub (Sep 25, 2018):

Hmm.. I didn't realize that.

Yeah, that is an easy add.

<!-- gh-comment-id:424341766 --> @pauldotknopf commented on GitHub (Sep 25, 2018): Hmm.. I didn't realize that. Yeah, that is an easy add.
Author
Owner

@Nihlus commented on GitHub (Sep 25, 2018):

Great!

<!-- gh-comment-id:424400119 --> @Nihlus commented on GitHub (Sep 25, 2018): Great!
Author
Owner

@Nihlus commented on GitHub (Nov 7, 2018):

Has there been any updates on this?

<!-- gh-comment-id:436667480 --> @Nihlus commented on GitHub (Nov 7, 2018): Has there been any updates on this?
Author
Owner

@pauldotknopf commented on GitHub (Dec 12, 2018):

I've looked at this some more, and I don't think QApplication should be used with QML applications. It is for supporting QWidgets, which Qml.Net shouldn't be used with.

<!-- gh-comment-id:446496176 --> @pauldotknopf commented on GitHub (Dec 12, 2018): I've looked at this some more, and I don't think ```QApplication``` should be used with QML applications. It is for supporting ```QWidgets```, which Qml.Net shouldn't be used with.
Author
Owner

@Nihlus commented on GitHub (Dec 12, 2018):

It's the official suggested (and only) way of making a Qml application have
reliable native look & feel, which is a very important consideration for
desktop applications.

Is there any specific reason this can't or won't be supported by Qml.Net?
Personally, not having native look & feel and being forced into a mobile
look on desktop is a showstopper.

On Wed, 12 Dec 2018, 09:00 Paul Knopf <notifications@github.com wrote:

Closed #73 https://github.com/qmlnet/qmlnet/issues/73.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/qmlnet/qmlnet/issues/73#event-2020773745, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACO2TOLmjUmWbvZjMJI4BhPCPZHzZh3kks5u4LeagaJpZM4W4lsS
.

<!-- gh-comment-id:446550297 --> @Nihlus commented on GitHub (Dec 12, 2018): It's the official suggested (and only) way of making a Qml application have reliable native look & feel, which is a very important consideration for desktop applications. Is there any specific reason this can't or won't be supported by Qml.Net? Personally, not having native look & feel and being forced into a mobile look on desktop is a showstopper. On Wed, 12 Dec 2018, 09:00 Paul Knopf <notifications@github.com wrote: > Closed #73 <https://github.com/qmlnet/qmlnet/issues/73>. > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <https://github.com/qmlnet/qmlnet/issues/73#event-2020773745>, or mute > the thread > <https://github.com/notifications/unsubscribe-auth/ACO2TOLmjUmWbvZjMJI4BhPCPZHzZh3kks5u4LeagaJpZM4W4lsS> > . >
Author
Owner

@pauldotknopf commented on GitHub (Dec 12, 2018):

I've created a sample QML app and my styling doesn't change when switching between QApplication and QGuiApplication. How exactly does QApplication effect QML applications?

<!-- gh-comment-id:446595233 --> @pauldotknopf commented on GitHub (Dec 12, 2018): I've created a sample QML app and my styling doesn't change when switching between ```QApplication``` and ```QGuiApplication```. How exactly does ```QApplication``` effect QML applications?
Author
Owner

@Nihlus commented on GitHub (Dec 12, 2018):

As you've already noted, using QApplication by itself does not change the styling. Rather, it enables native look and feel for the modules that support it - namely, QtQuick.Controls 1, and QWidgets. As far as I can read (although I haven't tested it myself) QtQuick.Controls 2 is explicitly intended to not provide a platform look and feel, but rather provide a uniform look across platforms.

Thus, the intended use case is QApplication along with QtQuick.Controls 1 to build native look and feel UI applications.

<!-- gh-comment-id:446618379 --> @Nihlus commented on GitHub (Dec 12, 2018): As you've already noted, using QApplication by itself does not change the styling. Rather, it enables native look and feel for the modules that support it - namely, QtQuick.Controls 1, and QWidgets. As far as I can read (although I haven't tested it myself) QtQuick.Controls 2 is explicitly intended to *not* provide a platform look and feel, but rather provide a uniform look across platforms. Thus, the intended use case is QApplication along with QtQuick.Controls 1 to build native look and feel UI applications.
Author
Owner

@pauldotknopf commented on GitHub (Jan 21, 2019):

This is implemented in develop.

I will update when it is on NuGet.

<!-- gh-comment-id:456207302 --> @pauldotknopf commented on GitHub (Jan 21, 2019): This is implemented in develop. I will update when it is on NuGet.
Author
Owner

@Nihlus commented on GitHub (Jan 23, 2019):

Nice!

<!-- gh-comment-id:456881033 --> @Nihlus commented on GitHub (Jan 23, 2019): Nice!
Author
Owner

@gridtech-pl commented on GitHub (Jul 7, 2019):

@Nihlus were you finally able to gain native look and feel?

<!-- gh-comment-id:509035047 --> @gridtech-pl commented on GitHub (Jul 7, 2019): @Nihlus were you finally able to gain native look and feel?
Author
Owner

@Nihlus commented on GitHub (Jul 8, 2019):

I've been waiting on this issue to be updated with a notification that it's on nuget, so not yet.

<!-- gh-comment-id:509259737 --> @Nihlus commented on GitHub (Jul 8, 2019): I've been waiting on this issue to be updated with a notification that it's on nuget, so not yet.
Author
Owner

@vadi2 commented on GitHub (Jul 8, 2019):

I think there's a misunderstanding here. Qt Quick will not give you native desktop widgets.

<!-- gh-comment-id:509279591 --> @vadi2 commented on GitHub (Jul 8, 2019): I think there's a misunderstanding here. Qt Quick will not give you native desktop widgets.
Author
Owner

@Nihlus commented on GitHub (Jul 8, 2019):

QML can use native desktop widgets when using QtQuick.Controls 1 - I use it at work every day in C++.

<!-- gh-comment-id:509284661 --> @Nihlus commented on GitHub (Jul 8, 2019): QML can use native desktop widgets when using QtQuick.Controls 1 - I use it at work every day in C++.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/qmlnet#47
No description provided.