开发者

QVariantMap DBusMenuExporterDBus GLib-GObject-CRITICAL GLib-GObject-WARNING

开发者 https://www.devze.com 2023-02-23 10:44 出处:网络
I am new to programming. I am creating a Qt GUI application. It is a small word jumble game. Problem is whenever I start this program from command prompt after building it I get following output on c

I am new to programming. I am creating a Qt GUI application. It is a small word jumble game. Problem is whenever I start this program from command prompt after building it I get following output on command prompt:

JumbleGame 1.0

Launching Application.....

QVariantMap DBusMenuExporterDBus::GetProperties(int, const QStringList&): Condition failed: action

upper two lines are ok, I printed them but what is QVariantMap DBusMenuExporterDBus::GetProperties(int, const QStringList&): Condition failed: action

After starting application it works fine But when I close it I get following output on command prompt:

(`<unknown>`:7312): G开发者_JAVA百科Lib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GObject'

(`<unknown>`:7312): GLib-GObject-CRITICAL **: g_object_get_data: assertion `G_IS_OBJECT (object)' failed

What all these errors mean and how can I remove them. My code is entirely in qt c++

Thanks in advance.


It sounds like you create a Menu and you added menu items without actions or your action no longer exists.

The DBus is a kind of messaging system used in Posix architectures that has a windows port. QVariantMap probably has something to do with how Qt internally manages some of the GUI elements you've put together.

So there is a strong possibility that you created some of your GUI elements on the stack in your constructor, and when you leave your constructor, those elements go out of scope, and your GUI now has a bunch of bad pointers.

So to fix this, make sure that you have Qt elements/widgets/objects on the heap according to the Qt Object Model.

Hope that helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消