Page 2 of 2 FirstFirst 12
Results 21 to 37 of 37

Thread: Qt5 developed app doesn't display correctly using Cinnamon desktop in VirtualBox

  1. #21
    Join Date
    Feb 2013
    Posts
    65
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt5 developed app doesn't display correctly using Cinnamon desktop in VirtualBox

    Quote Originally Posted by wysota View Post
    Ctrl+Alt+F1, login, sudo service sddm stop (or lightdm, depending what your system is using), X &, Ctrl+Alt+F1, DISPLAY=:0 yourapp
    I had stop mdm service. After entering "X &" then screen is just blank. Then if I choose Ctrl+Alt+F1 it says "Loading extension GLX" and just sits there.

    Edit: I then just hit Return and got prompt. Then cd to my app directory, then DISPLAY=:0 ./myapp. It says failed to load magic3 and vboxvideo.
    Last edited by te777; 3rd July 2015 at 10:11.

  2. #22
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt5 developed app doesn't display correctly using Cinnamon desktop in VirtualBox

    Does Alt+F7 show a gray screen with a cursor?

    You can also try putting the full path to your application in ~/.xinitrc and restart your desktop session as usual. This should launch your app instead of DE. Just remember to remove the file afterwards (using the console) so that next time you start X your desktop gets loaded.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #23
    Join Date
    Feb 2013
    Posts
    65
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt5 developed app doesn't display correctly using Cinnamon desktop in VirtualBox

    Alt+F7 doesn't show anything. I guess it can't load some drivers out of a display manager, particularly vboxvideo, in VirtualBox. But my app works fine in other desktops, but not Cinnamon. I guess that tells me it's either a Cinnamon or VirtualBox problem. Seems like the problem started with VBox 4.3.18. I'm using VBox 5.0.0 RC2 now.

  4. #24
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt5 developed app doesn't display correctly using Cinnamon desktop in VirtualBox

    Quote Originally Posted by te777 View Post
    Alt+F7 doesn't show anything. I guess it can't load some drivers out of a display manager, particularly vboxvideo, in VirtualBox. But my app works fine in other desktops, but not Cinnamon. I guess that tells me it's either a Cinnamon or VirtualBox problem. Seems like the problem started with VBox 4.3.18. I'm using VBox 5.0.0 RC2 now.
    As far as I understand, you have only tested your app with a single Cinnamon installation. I don't think that's enough to assume Cinnamon is to blame. Applications usually don't care about desktop environments they run in.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #25
    Join Date
    Feb 2013
    Posts
    65
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt5 developed app doesn't display correctly using Cinnamon desktop in VirtualBox

    I've tried Cinnamon with Ubuntu, Linux Mint and Debian, all with the same problem. The problem doesn't occur in Unity Ubuntu, Linux Mint Xfce or Debian Xfce. And I've tested on other distros as well, including: Fedora 18, openSuse 12.3, and Mageia 2, with no problems. My gut tells me it's a VirtualBox or Cinnamon problem, or possibly even a Qt problem. One of those 3. I've posted bug reports with those 3.
    Last edited by te777; 3rd July 2015 at 17:20.

  6. #26
    Join Date
    Feb 2013
    Posts
    65
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt5 developed app doesn't display correctly using Cinnamon desktop in VirtualBox

    Update: I tried my app with the latest Fedora (Xfce) and Mageia (gnome). The Fedora had no problems, but the Mageia had the problem with gnome desktop. I installed the Xfce desktop on Mageia and the problem didn't happen. Just in case someone is following this thread.

  7. #27
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt5 developed app doesn't display correctly using Cinnamon desktop in VirtualBox

    I still think you are looking in a wrong place. The desktop is not a problem. The configuration is.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  8. #28
    Join Date
    Feb 2013
    Posts
    65
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt5 developed app doesn't display correctly using Cinnamon desktop in VirtualBox

    What do you mean by configuration? Settings in design mode for the app? Or problems with the libs deployed with the apps? I've tried several desktops in Mageia with the following results:

    Desktop Problems

    KDE No
    Mate No
    Openbox No
    LXDE No
    Xfce No
    Gnome Yes
    Gnome Classic Yes
    Cinnamon Yes

    The common factor seems to be VirtualBox. I've heard on the web that VBox doesn't do a good job with OpenGL drivers or display management. But if I can change the design of my app or how it is deployed to alleviate the problem, I haven't given up on that yet. Just at a roadblock here with that. Any suggestions on the configuration issue?
    Last edited by te777; 4th July 2015 at 01:39.

  9. #29
    Join Date
    Oct 2012
    Posts
    132
    Thanks
    10
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Qt5 developed app doesn't display correctly using Cinnamon desktop in VirtualBox

    For your tests you can also play around with some environment variables:
    XDG_CURRENT_DESKTOP: Used by Qt to identify the desktop environment (KDE, gnome, cinnamon, ...).
    QT_STYLE_OVERRIDE: Sets the Qt style to be used (breeze, oxygen, gtk, ...) independent from the recognized desktop environment. (See also anda_skoa's last post.)

    Are other Qt 5 applications also affected by the bug (kwrite, konsole, systemsettings5, smplayer, ...)? If not, the problem is likely just somewhere in your specific application.
    (When testing these applications, check whether the version you are using is already ported to Qt 5!)
    Last edited by Infinity; 4th July 2015 at 01:52.

  10. #30
    Join Date
    Feb 2013
    Posts
    65
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt5 developed app doesn't display correctly using Cinnamon desktop in VirtualBox

    A very important fact is that I loaded Linux Mint Cinnamon into VMWare Player with 3D acceleration, and the problem doesn't occur. It only occurs in the desktops (Cinnamon and Gnome) with 3D acceleration in VBox. Those 2 desktops don't have any problems when 3D acceleration is disabled in VBox.

  11. #31
    Join Date
    Oct 2012
    Posts
    132
    Thanks
    10
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Qt5 developed app doesn't display correctly using Cinnamon desktop in VirtualBox

    Then don't use 3D acceleration with Cinnamon/Gnome in VirtualBox if this setup doesn't work.

    Did you test other applications, just to be sure that the problem doesn't come from your own app?

    What happens if you set the style to fusion using the mentioned environment variable?

    You can try to get a newer version of Cinnamon/Gnome, VirtualBox, or Qt. (Maybe the problem is already fixed.)

  12. #32
    Join Date
    Feb 2013
    Posts
    65
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt5 developed app doesn't display correctly using Cinnamon desktop in VirtualBox

    I've tested using the latest Cinnamon/Gnome, Vbox, and Qt. I was just trying fix a problem when my app gets downloaded from the web and the user has his/her system in VBox. The easiest thing I guess is to tell users on my download page just to disable 3D acceleration in VBox if they want to get my app to display properly. But that's not a solution, it's a stop-gap measure, a rough workaround. Advising to not use 3D acceleration in VBox isn't a real solution, especially since without 3D in VBox the Linux guest video is slow and lagging. But that's what I'll have to do until a real solution is found.

  13. #33
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt5 developed app doesn't display correctly using Cinnamon desktop in VirtualBox

    Quote Originally Posted by te777 View Post
    What do you mean by configuration?
    Each Linux distribution has different maintainers who configure their distros differently. KDE installed on Linux Mint will be configured differently than KDE installed on Fedora or Debian. Freetype (responsible for font rendering) might be configured differently on Ubuntu and on Arch Linux. Fontconfig (responsible for font matching) might be configured differently on different systems. Each desktop environment might provide different overrides to many of the settings which are different too.

    The common factor seems to be VirtualBox. I've heard on the web that VBox doesn't do a good job with OpenGL drivers or display management. But if I can change the design of my app or how it is deployed to alleviate the problem, I haven't given up on that yet. Just at a roadblock here with that. Any suggestions on the configuration issue?
    I'm wondering whether someone else tested Qt apps on the same combinations as you did and had similar results. I understand that examples that come with Qt experience the same problems as your application, is that correct?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  14. #34
    Join Date
    Feb 2013
    Posts
    65
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt5 developed app doesn't display correctly using Cinnamon desktop in VirtualBox

    I think the problem with my app is that it passes so many widgets as parameters to the output procedure and then the app asks the OS which asks the video drivers to display them all at one time. I think different desktops get confused with all those widgets to display at one time, i.e., the video driver's response to such a request. I haven't tested the Qt examples yet. I wouldn't think they have a similar design as mine.

  15. #35
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt5 developed app doesn't display correctly using Cinnamon desktop in VirtualBox

    Quote Originally Posted by te777 View Post
    I think the problem with my app is that it passes so many widgets as parameters to the output procedure and then the app asks the OS which asks the video drivers to display them all at one time. I think different desktops get confused with all those widgets to display at one time, i.e., the video driver's response to such a request.
    No, that's silly. Desktops don't draw your applications, the apps do it by themselves, the compositor can at most receive a single bitmap with the whole window already rendered to it. And why would it garble text but not anything else?

    I haven't tested the Qt examples yet.
    That's the first thing you should have done.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  16. #36
    Join Date
    Feb 2013
    Posts
    65
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt5 developed app doesn't display correctly using Cinnamon desktop in VirtualBox

    Can you suggest any Qt examples to compile and test with Linux distros in VirtualBox? By the way, I loaded Mageia in VMWare Player and it didn't have a problem with my app using Gnome. Nor did Ubuntu with the Gnome flashback desktop in VirtualBox. Cinnamon doesn't have a problem with 3D acceleration in VMWare Player either.
    Last edited by te777; 4th July 2015 at 10:43.

  17. #37
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt5 developed app doesn't display correctly using Cinnamon desktop in VirtualBox

    Quote Originally Posted by te777 View Post
    Can you suggest any Qt examples to compile and test with Linux distros in VirtualBox?
    Any that displays text in QTextEdit
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. if statement doesn't behave correctly
    By esotery in forum Qt Programming
    Replies: 8
    Last Post: 1st August 2012, 03:46
  2. Replies: 2
    Last Post: 31st August 2011, 16:15
  3. Replies: 1
    Last Post: 1st June 2011, 18:37
  4. QWebView doesn't display correctly unicode
    By binaural in forum Qt for Embedded and Mobile
    Replies: 16
    Last Post: 3rd September 2010, 08:24
  5. QTableView does not display time string correctly
    By ad5xj in forum Qt Programming
    Replies: 1
    Last Post: 5th August 2007, 20:35

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.