Results 1 to 3 of 3

Thread: QMenu behaving differently on different platforms

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2012
    Location
    Austria
    Posts
    22
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanked 1 Time in 1 Post

    Default Re: QMenu behaving differently on different platforms

    Hi cRay, could you explain in detail what you mean with "a QPushButton that has a QMenu"? Are you creating a QMenu like a context menu when the button is clicked? Just a weird idea: if you create the QMenu without parent, Qt probably creates a top level window where the decoration depends on the window manager of the system. Do you use QMenu:opup or QMenu::exec ?

  2. #2
    Join Date
    Aug 2021
    Posts
    2
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: QMenu behaving differently on different platforms

    I solved it, I added "-style Fusion" to the command line that started the app on the embedded system.

    QPushButton has a method called "setMenu( QMenu* )" and by default it will show the menu once clicked, thats how I use it.

Similar Threads

  1. QTabWidget style each tab differently
    By MichaH in forum Qt Programming
    Replies: 2
    Last Post: 11th October 2016, 09:24
  2. Replies: 0
    Last Post: 4th April 2012, 11:55
  3. QStringList::contains() not behaving as expected
    By JPNaude in forum Qt Programming
    Replies: 1
    Last Post: 7th November 2011, 09:30
  4. Derived class from QLineEdit is behaving differently.
    By savaliya_ambani in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 21st January 2011, 08:40
  5. Modal dialog not behaving
    By tpf80 in forum Qt Programming
    Replies: 7
    Last Post: 16th September 2008, 22:03

Tags for this Thread

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.