1 Attachment(s)
QT menu window style in linux
Hi all,
I stuck with the problem when build menu with Qt4 in ubuntu. The menu shows up on the upper left corner as Ubuntu style. :( :(
How can I change this into window like style like this one.
As far as I know, it is because using QMainWindow, it tries to mimic the desktop environment.
In addition, my target platform is embedded linux device :)
Attachment 10038
http://qt-project.org/doc/qt-4.8/mainwindows-menus.html
Thanks you all for reading, and sorry about my English. ^^
Re: QT menu window style in linux
Quote:
Originally Posted by
atenakid
In addition, my target platform is embedded linux device :)
In this case you don't have to do anything. Your target device is not going to run Unity, is it?
Cheers,
_
Re: QT menu window style in linux
You can remove the native titlebar with qt flags and you can create your own custom one, though it takes a bit more work.I didn't done it yet.
Otherwise, if your targeted platform has the window control buttons on the right,how you want it, there is no point in going that deep.
http://qt-project.org/doc/qt-4.8/qt....indowType-enum
Re: QT menu window style in linux
Quote:
Originally Posted by
anda_skoa
In this case you don't have to do anything. Your target device is not going to run Unity, is it?
Cheers,
_
By now I just made the desktop target in ubuntu. I have never build for the embedded yet.
As far as I know, my target environment must be stblinux of BradCom. I have no idea what going on with this.
Thanks for your reply,
PS: This is my first time in OOP and Qt, I'm sorry for some non-sense questions. ^^
Re: QT menu window style in linux
Quote:
Originally Posted by
atenakid
By now I just made the desktop target in ubuntu. I have never build for the embedded yet.
As far as I know, my target environment must be stblinux of BradCom. I have no idea what going on with this.
The menu is one of the things that are handled through the platform integration plugin. Since you run Ubuntu with Unity, the menu gets placed into Unity's menu location, as users of that platform would expect.
On your target your are either not running Unity, thus getting "inline" menus, or, if you are running Unity, then this is the expected behavior.
Cheers,
_
Re: QT menu window style in linux
Quote:
Originally Posted by
anda_skoa
The menu is one of the things that are handled through the platform integration plugin. Since you run Ubuntu with Unity, the menu gets placed into Unity's menu location, as users of that platform would expect.
On your target your are either not running Unity, thus getting "inline" menus, or, if you are running Unity, then this is the expected behavior.
Cheers,
_
Thanks you for quick reply,
Just in case of running Unity, how can I made the menu show up as window style? would you give me some suggestion for that?
Some examples reference would be the best since I'm a Qt chicken, ^^
Many thanks,
Re: QT menu window style in linux
I am not sure how the achieved the integration, Canonical might even have added a local patch to Qt.
You could try building and running your application against a different Qt version.
Cheers,
_
Re: QT menu window style in linux
Are you talking about the "global application menu"?
According to an answer on askubuntu this feature can be disabled by removing the indicator-appmenu package. (Because of ugly things like that feature I prefer other desktop environments over Unity.)
See: http://askubuntu.com/questions/10481...plication-menu
Re: QT menu window style in linux
Quote:
Originally Posted by
Infinity
Are you talking about the "global application menu"?
According to an answer on askubuntu this feature can be disabled by removing the indicator-appmenu package. (Because of ugly things like that feature I prefer other desktop environments over Unity.)
See:
http://askubuntu.com/questions/10481...plication-menu
Thanks you, it works for my case in Ubuntu environment ^^. I wonder can I do it in the embedded Linux and is there any problem while disable those?
Many thanks,
Re: QT menu window style in linux
Quote:
Originally Posted by
atenakid
Thanks you, it works for my case in Ubuntu environment ^^. I wonder can I do it in the embedded Linux and is there any problem while disable those?
Disable what?
Cheers,
_
Re: QT menu window style in linux
Quote:
I wonder can I do it in the embedded Linux and is there any problem while disable those?
I don't think the problem will occur on embedded Linux since there will be no Unity desktop. Thus there is nothing to be disabled.