Results 1 to 12 of 12

Thread: Qt updates and ui display on Ubuntu

  1. #1
    Join Date
    Jan 2010
    Posts
    22
    Thanks
    5

    Default Qt updates and ui display on Ubuntu

    Hello,

    I'm using Qt on Ubuntu 10.04. Each time after updating Qt, I got some problem for the Qt Creator ui display.

    * When I updated Qt to v4.6.1 and Creator to 1.3.1, the QGroupBox board in QCreator IDE disappeared. But when the UI is executed, the board is there.

    * When I updated Qt to v4.7.0 and Creator to 2.0.1, the icon image in the QPushButton disappeared when the UI is executed, but it shows in the Creator IDE.

    Any idea about what's wrong with my QT application and any suggestions?

    Thank you!

  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: Qt updates and ui display on Ubuntu

    Do you use your distro's package management facilities to upgrade Qt and Creator or did you download those components yourself in the source/binary form from Nokia's website and install them yourself?
    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
    Jan 2010
    Posts
    22
    Thanks
    5

    Default Re: Qt updates and ui display on Ubuntu

    I did both -- from Ubuntu Synaptic Package Manager and from Norkia's website.

  4. #4
    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: Qt updates and ui display on Ubuntu

    Do you use a custom widget style? Are you running gnome or kde?
    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. #5
    Join Date
    Jan 2010
    Posts
    22
    Thanks
    5

    Default Re: Qt updates and ui display on Ubuntu

    no custom widget style and running gnome.

  6. #6
    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: Qt updates and ui display on Ubuntu

    Try running Creator (or any other app that behaves incorrectly) with "-style plastique" and see if it helps.
    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.


  7. #7
    Join Date
    Jan 2010
    Posts
    22
    Thanks
    5

    Default Re: Qt updates and ui display on Ubuntu

    Running qtcreator -style plastique for both creator v1.3.1 and 2.01, the groupbox board is shown in IDE. But still the icon image was not loaded when the UI was executed. In IDE the icon was shown on the pushbutton. my icon image format is png.


    Added after 43 minutes:


    Hi

    I think the problem may related to qt ui update. My ui application was started from a version that is older than Qt 4.6.1. Update to qt 4.6.1 no big problem, just this style issue for qgroupbox. But update to Qt 4.7, I just find, not only icon display problem but also the application ui is totally wrong.

    * When I try to edit ui. it goes to Design mode.
    * Add a pushButton, it shows on the ui in IDE. But cannot find it on the app.cpp file. for example ui-> no such button name.
    * Build project and run the project, the ui was totally no change, even though I add a pushButton and also it is shown on the ui in IDE.
    Last edited by fulin; 31st December 2010 at 13:33.

  8. #8
    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: Qt updates and ui display on Ubuntu

    Clean the project completely (i.e. make distclean) and rebuild it again from scratch (qmake && make).
    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.


  9. #9
    Join Date
    Jan 2010
    Posts
    22
    Thanks
    5

    Default Re: Qt updates and ui display on Ubuntu

    From scratch it works well even just with "make". But is there anyway to do the same thing in Creator IDE?

    I tried many different combination of "clean project", "rebuild project" and "qmake" in the Build menu of Creator IDE, but no help. Icon image not show and changes on ui not added to the project. Is there a bug in the Creator v2.01? Or I must do every thing for the ui from scratch?

  10. #10
    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: Qt updates and ui display on Ubuntu

    You probably have shadow build enabled and Creator builds your project in a different directory. You probably use relative paths to your images and if they are stored in the directory with the source code then the binary can't find them because it is executed from another directory. It's best to embed images directly in the executable using Qt's resource system.
    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.


  11. The following user says thank you to wysota for this useful post:

    fulin (31st December 2010)

  12. #11
    Join Date
    Jan 2010
    Posts
    22
    Thanks
    5

    Default Re: Qt updates and ui display on Ubuntu

    Hello wysota,

    You are right. I disabled the "shadow-build" in the project setting and now the Qt4.7 and Creator 2.0.1 work well for my application.

    Thank you very much!

  13. #12
    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: Qt updates and ui display on Ubuntu

    Just remember that shadow build is not the real problem here. The problem is using relative paths to images. You will still have this problem if you run the application by clicking its icon in file explorer (at least some of them).
    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. installing updates
    By uj in forum Installation and Deployment
    Replies: 3
    Last Post: 13th July 2012, 08:15
  2. Test FrameBUffer On Ubuntu 10.10 i386 Cant Display ?
    By Thành Viên Mới in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 17th November 2010, 03:10
  3. QMenuBar Updates
    By johnmauer in forum Qt Programming
    Replies: 5
    Last Post: 20th January 2010, 13:35
  4. Painting updates
    By QbelcorT in forum Qt for Embedded and Mobile
    Replies: 6
    Last Post: 29th September 2008, 00:48
  5. QDataTable Inserts and Updates
    By ederbs in forum Qt Programming
    Replies: 2
    Last Post: 26th October 2006, 23:23

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.