Results 1 to 18 of 18

Thread: Different behaviour on different distributions

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Posts
    11
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Different behaviour on different distributions

    Qt3 has such plugins also.
    Okay, but I couldn't find them. But both Gentoo boxes have nearly the same USE flags (except of some workstation-related stuff like "cups" or "xinerama"), so the support for various image format should be there. Additionally, I can't believe that a binary distribution like SUSE has Qt's PNG support missing... (SUSE has *everything* )

    Could you tell us a bit more about your project?
    Well, it's a small business suite to be enhanced to fit the needs of various branches. You can visit http://www.kumula.org to find out more, and if you think "Why another business software?" please read http://www.kumula.org/docs/?title=Paradigm

    As promised, I post a development version here: http://www.kumula.org/kumula-2006.02alpha.tar.gz
    Extract it anywhere, and run "./Kumula/bin/configurator.py", because the Configurator program is the one and only which doesn't need a database. You should see the Kumula icon on the left side of the menubar, and the QMessageBoxes shouldn't have visible HTML tags...

    Thanks for any help!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Different behaviour on different distributions

    Quote Originally Posted by Kumula
    You should see the Kumula icon on the left side of the menubar, and the QMessageBoxes shouldn't have visible HTML tags...
    I can't see the icon, but message boxes are OK.

  3. #3
    Join Date
    Jan 2006
    Posts
    11
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Different behaviour on different distributions

    Okay, now it's 3:1 for an invisible PNG icon in the menubar... Did I implement something wrong? The menubar for all applications is defined in ./Kumula/lib/KumulaMainWindow.py, in class "KKumulaMainWindow", in method "createMenuBar()". The Python code
    Qt Code:
    1. self.MenuBar.insertItem(kumula.getMenuBarIcon("kumula",1), self.menuProg, -1)
    To copy to clipboard, switch view to plain text mode 
    should be equivalent to the following Qt method:
    Qt Code:
    1. int insertItem ( const QPixmap & pixmap, QPopupMenu * popup, int id = -1, int index = -1 )
    To copy to clipboard, switch view to plain text mode 
    What did I wrong? Or is it a PyQt issue?

    And what could be the reason for the not-interpreted HTML tags in the QMessageBox?
    Curious, things that should be visible are not, and vice versa...

    Anyway, thank you for testing!

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Different behaviour on different distributions

    Quote Originally Posted by Kumula
    What did I wrong? Or is it a PyQt issue?
    This might be a Qt bug similar to this one: http://www.trolltech.com/developer/t...entry&id=82181

    And what could be the reason for the not-interpreted HTML tags in the QMessageBox?
    I don't know, but it works on my system.

    Are you sure that you have exactly the same version of Qt on both Gentoo systems?

  5. #5
    Join Date
    Jan 2006
    Posts
    11
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Different behaviour on different distributions

    Yep, both have "qt-3.3.5" installed. The only difference are some
    qt-unrelated USE variables, like "xinerama" or "cups".

    But I wonder why it doesn't work on binary distributions like SUSE.
    In the meanwhile I tried it on a Kubuntu machine, and there the icon is invisible, too.

    Maybe I'm calling the wrong PyQt method? Or PyQt is calling the wrong Qt method?
    Or the right method with wrong parameters? I don't have a clue...

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Different behaviour on different distributions

    Quote Originally Posted by Kumula
    Yep, both have "qt-3.3.5" installed. The only difference are some
    qt-unrelated USE variables, like "xinerama" or "cups".
    Maybe there were some patches applied to one of those versions?

  7. #7
    Join Date
    Jan 2006
    Posts
    11
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Different behaviour on different distributions

    That's improbable, because Gentoo would increase
    the version number like "qt-3.3.5-r1". Additionally,
    my workstation is nearly a fresh install (with no
    Qt update since them), so everything should be working...

    But... what's the correct Qt behaviour?
    In my opinion, the icon should be visible everywhere,
    and the visible icon on my notebook shouldn't be the exception.

    Is it possible for you to do this in a little C++ program?
    Maybe we can narrow down the error to Qt or PyQt...
    (I don't have so much C++ experience at all)

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Different behaviour on different distributions

    Quote Originally Posted by Kumula
    Is it possible for you to do this in a little C++ program?
    Maybe we can narrow down the error to Qt or PyQt...
    Qt Code:
    1. #include <qapplication.h>
    2. #include <qiconset.h>
    3. #include <qmainwindow.h>
    4. #include <qmenubar.h>
    5. #include <qpixmap.h>
    6.  
    7. int main( int argc, char **argv )
    8. {
    9. QApplication app( argc, argv );
    10.  
    11. QPixmap icon( "m_kumula.png" );
    12. qWarning( "icon.isNull == %d", icon.isNull() );
    13.  
    14. QMenuBar *menuBar = mw.menuBar();
    15.  
    16. menuBar->insertItem( icon );
    17. menuBar->insertItem( QIconSet( icon ), icon );
    18. menuBar->insertItem( QIconSet( icon, QIconSet::Small ), icon );
    19. menuBar->insertItem( QIconSet( icon, QIconSet::Large ), icon );
    20. menuBar->insertItem( QIconSet( icon ), "test" );
    21.  
    22. app.setMainWidget( &mw );
    23. mw.show();
    24.  
    25. return app.exec();
    26. }
    To copy to clipboard, switch view to plain text mode 

    I guess it's Qt bug.
    Attached Images Attached Images

  9. #9
    Join Date
    Jan 2006
    Posts
    11
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Different behaviour on different distributions

    Sorry for re-activating this thread after a long time, but I guess the problem is solved. I happened to try different widget styles, and with some of them the error occurs (pixmap is invisible), and with other styles the pixmap is shown correctly.

    Some widget styles known to draw pixmaps in the menubar:
    Keramik, Active Heart, ThinKeramik, Phase

    Some widget styles known to NOT supporting this:
    Plastik, Baghira, .NET

    Hope this helps anyone someday.

    Greets,
    Juergen

Similar Threads

  1. Disable default tab behaviour for a QGraphicsItem
    By nmather in forum Qt Programming
    Replies: 3
    Last Post: 13th December 2017, 10:30
  2. Inconsistent behaviour of QVBoxLayout
    By spraff in forum Qt Programming
    Replies: 3
    Last Post: 26th November 2008, 18:36
  3. snap to grid behaviour
    By dreamer in forum Qt Programming
    Replies: 1
    Last Post: 3rd May 2008, 08:35
  4. QAbstractItemView selection behaviour issue
    By Caius Aérobus in forum Qt Programming
    Replies: 4
    Last Post: 1st May 2007, 16:33
  5. [Qt 4.1] Strange behaviour with QTableView
    By fane in forum Qt Programming
    Replies: 1
    Last Post: 23rd January 2006, 06:17

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
  •  
Qt is a trademark of The Qt Company.