Page 1 of 2 12 LastLast
Results 1 to 20 of 37

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

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

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

    I have an app I've developed in Qt 5.3.1 that doesn't display data in output text boxes when using the Linux Cinnamon desktop in VirtualBox with 3D acceleration enabled in the display settings for the virtual machine.

    It does this when using the Cinnamon desktop in any Linux Distro (I've tried Cinnamon with Linux Mint, Ubuntu and Debian). The regular Unity desktop in Ubuntu and the Xfce desktops in both Linux Mint and Debian have no problem. Just Cinnamon.

    I don't know if this is a Cinnamon, VirtualBox or Qt problem. Months ago I registered a bug with the Cinnamon folks but I never saw a fix, or that the problem was replicated anywhere. If I disable 3D acceleration for any of the Cinnamon virtual machines in VirtualBox the problem doesn't happen.

    I'm posting here because maybe some Qt developers have seen similar problems with Cinnamon in either VirtualBox, or a native Linux machine.

    Any comments or replies would be welcome. Thanks in advance for any.

  2. #2
    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

    What kind of app are we talking about?
    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. #3
    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

    It's called Lottery Analyzer Expert QL: it can be downloaded at http://tcesoftware.webs.com., follow the link to Linux Downloads.

    It's free. My main versions are Windows, but I have both a 32 bit and 64 bit version for Linux developed in Qt 5.3.1. I hope the link I posted is OK. It's a free application, though not open source (because of the nature of the subject).

    It does various analyses on the Powerball and Mega Millions lottery games. I developed the programs out of curiosity of how to do it, and offering them for free for all the very useful free software I've used over the years. Again, I hope posting the link is OK. I just want someone to try my program and see if they can replicate the problem in any environment.

    Just double click on either Lottery_32 (32 bit) or Lottery_64 (64 bit) in the folder created by downloading and unzipping the tar.gz. Then choose one of the analyze buttons or "drawn" buttons after entering the number of draws to sort. If it runs correctly data will fill the text boxes for the game chosen to sort the totals of. The problem will show if the text boxes are empty except for the last row.

  4. #4
    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

    The VirtualBox issue post is here:

    https://forums.virtualbox.org/viewtopic.php?f=3&t=68650

    The Cinnamon issue post is here:

    https://github.com/linuxmint/Cinnamon/issues/4389

    In case anyone wants to add any replies in replicating the problem in Cinnamon either in VirtualBox or a native Linux machine.

  5. #5
    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 was rather asking whether it is a widget based app, Qt Quick or Graphics View
    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.


  6. #6
    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

    Widget based I guess. I just created text boxes and my app outputs to them.

  7. #7
    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

    Is the text missing only in some of the widgets? Do these include input widgets? Have you tried setting a different font (size/family)?
    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. #8
    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

    The data doesn't output to the text box widgets. It's just using the system font now I think. I'll try playing with that and see if that makes a difference. I'll report back. Thanks for helping.


    Added after 58 minutes:


    Changing fonts doesn't seem to help. The text boxes use San Serif Medium 9. They're QTextEdit text boxes that I use for output. Maybe that's problem. I have one set of text boxes (4 rows of 17) used for Powerball and another set (4 rows of 20) used for Mega Millions. The data only displays on the last row for each. The other text boxes are left blank when they should have data in them.
    Last edited by te777; 2nd July 2015 at 09:23.

  9. #9
    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

    What if you place text on QLabel? What about QLineEdit widgets? What about menus?
    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.


  10. #10
    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'm in the process of changing all the QTextEdit boxes to QLineEdit boxes. I'll let you know how it goes.

  11. #11
    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

    Change just one or run one of numerous Qt examples that already contain those widgets.
    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.


  12. #12
    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 changed all the QTextEdit widgets to QLinEdit widgets. No help. The code that gets run does a sort procedure first in the class I'm using (one class for Powerball and one for Mega Millions). Then an output procedure gets called that passes the references to the widgets to that output procedure from mainwindow.cpp. I tried putting qApp->ProcessEvents() in different places in the button click procedures that call the sort and output sort in the class I'm using, but with no help so far. It's as if data isn't getting flushed to the widgets properly with 3D acceleration enabled.

    The button click procedure code is below:

    Qt Code:
    1. void MainWindow::on_pushButton_clicked()
    2. {
    3.  
    4. int range = 1;
    5.  
    6. bool dooutput;
    7.  
    8. int drawstosort;
    9.  
    10. bool ok;
    11.  
    12.  
    13. Powerball* p = new Powerball();
    14.  
    15. p->readnums();
    16.  
    17. if (p->inputfilefound) {
    18.  
    19. dooutput = p->sort_input_validate( ui->textEdit_5 );
    20.  
    21. if (dooutput) {
    22.  
    23. drawstosort = ui->textEdit_5->toPlainText().toInt(&ok,10);
    24.  
    25. p->sort(drawstosort);
    26.  
    27. // qApp->processEvents();
    28.  
    29. p->outputsort (ui->lineEdit , ui->lineEdit_2 , ui->lineEdit_4 , ui->lineEdit_3 ,
    30. ui->lineEdit_8 , ui->lineEdit_6 , ui->lineEdit_5 , ui->lineEdit_7 ,
    31. ui->lineEdit_13 , ui->lineEdit_10 , ui->lineEdit_9 , ui->lineEdit_12 ,
    32. ui->lineEdit_11 , ui->lineEdit_14 , ui->lineEdit_16 , ui->lineEdit_15 ,
    33. ui->lineEdit_17 , ui->lineEdit_29 , ui->lineEdit_21 , ui->lineEdit_20 ,
    34. ui->lineEdit_26 , ui->lineEdit_23 , ui->lineEdit_31 , ui->lineEdit_34 ,
    35. ui->lineEdit_32 , ui->lineEdit_19 , ui->lineEdit_22 , ui->lineEdit_33 ,
    36. ui->lineEdit_18 , ui->lineEdit_24 , ui->lineEdit_29 , ui->lineEdit_27 ,
    37. ui->lineEdit_25 , ui->lineEdit_30 , ui->lineEdit_58 , ui->lineEdit_37 ,
    38. ui->lineEdit_66 , ui->lineEdit_44 , ui->lineEdit_46 , ui->lineEdit_63 ,
    39. ui->lineEdit_47 , ui->lineEdit_32 , ui->lineEdit_39 , ui->lineEdit_41 ,
    40. ui->lineEdit_49 , ui->lineEdit_55 , ui->lineEdit_40 , ui->lineEdit_56 ,
    41. ui->lineEdit_52 , ui->lineEdit_57 , ui->lineEdit_43 , ui->lineEdit_61 ,
    42. ui->lineEdit_54 , ui->lineEdit_68 , ui->lineEdit_50 , ui->lineEdit_35 ,
    43. ui->lineEdit_59 , ui->lineEdit_67 , ui->lineEdit_60 , ui->lineEdit_38 ,
    44. ui->lineEdit_62 , ui->lineEdit_48 , ui->lineEdit_45 , ui->lineEdit_53 ,
    45. ui->lineEdit_36 , ui->lineEdit_51 , ui->lineEdit_64 , ui->lineEdit_65 ,
    46. range
    47. );
    48. }
    49. }
    50.  
    51. qApp->processEvents();
    52.  
    53.  
    54. delete p;
    55. }
    To copy to clipboard, switch view to plain text mode 

    Then the class does the sort and output using the widgets passed to the output procedure.

  13. #13
    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

    Doing random things will not really help. If text is not painted in a widget then processing events will not help in any way. You need to determine whether the problem is with fonts or something else. Check what happens if you try selecting some text. My nose tells me your problem has something to do with fontconfig. It would be wise to try and reproduce the problem in a different environment (e.g. differently configured VM, different distro, etc.).
    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. #14
    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

    When I deploy the app to any Linux VM in VirtualBox with 3D accleration, with the Cinnamon desktop, the problem occurs. I tried compiling on Linux Mint Xfce to see if that makes a difference: it doesn't. Only when deployed to Cinnamon desktops (tried with Cinnamon in Ubuntu, Linux Mint and Debian).

    Here's the Cinnamon issue post with them:

    https://github.com/linuxmint/Cinnamon/issues/3617

  15. #15
    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

    What happens if you run your app without Cinnamon, e.g. with bare X?
    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. #16
    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

    The app works fine. In both Linux Mint and Debian Xfce, and in Ubuntu. I guess I could try some other distros too. Care to suggest any. The app used to work fine in Cinnamon until VirtualBox version 4.3.18. I guess I could try an older version of VirtualBox to to see if the problem occurs.

  17. #17
    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

    No, you misunderstood me. Use your virtual machine, just without Cinnamon -- shut down the display manager, login to the console, run X without any desktop environment and start your app with DISPLAY=:0.
    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.


  18. #18
    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

    How do you do that?

  19. #19
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

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

    You could try forcing a certain Qt widget style to be used.
    The problem sounds like it might be caused by different widget styles being used in different environments, or the same widget style picking up different settings depending on environment.

    E.g. a qt specific style (plastique for Qt4, fusion for Qt5), or an explicit foreign style (windows)

    Cheers,
    _

  20. #20
    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
    How do you do that?
    Ctrl+Alt+F1, login, sudo service sddm stop (or lightdm, depending what your system is using), X &, Ctrl+Alt+F1, DISPLAY=:0 yourapp
    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.