Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Can not remove border around QMenu
Forum Updated to NodeBB v4.3 + New Features

Can not remove border around QMenu

Scheduled Pinned Locked Moved Solved Mobile and Embedded
4 Posts 2 Posters 605 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    fire1
    wrote on last edited by fire1
    #1

    Hi!

    Im working on a project that will run on an embedded linux device (direct to the framebuffer). On the GUI that Im building I have a QPushButton that has a QMenu that is populated with a bunch of QWidgetActions.

    On my embedded device I get a border around the QWidgets and I can not remove it.

    Same code on my Linux development desktop (kubuntu 18.04) I get no borders

    Same code on my Windows 10 laptop I get borders but I can remove them with:
    m_pMenu->setStyleSheet( "border: 0;" );

    The StyleSheet code has no effect on my embedded device. Any ideas on what to do? I dont want the border to appear.

    Qt Version on the embedded device is 5.12

    Thanks,

    Photo of the screen on my embedded device:
    20210824_174804.jpg

    Photo of the screen on my dev machine:
    20210824_174639.jpg

    1 Reply Last reply
    0
    • F Offline
      F Offline
      fire1
      wrote on last edited by fire1
      #4

      After some investigation I realized that the application has different default styles depending on the host system. After adding -style Fusion to the start command on the embedded system it behaves exactly as on my dev machine.

      It doesnt explain why the StyleSheet code doesnt work but it solves my issue.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi and welcome to devnet,

        How are you starting your application on your target ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        F 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi and welcome to devnet,

          How are you starting your application on your target ?

          F Offline
          F Offline
          fire1
          wrote on last edited by
          #3

          @SGaist Thanks!

          I start the application with this line:

          ./disp -platform linuxfb:fb0 -plugin tslib
          

          disp is the binary.

          1 Reply Last reply
          0
          • F Offline
            F Offline
            fire1
            wrote on last edited by fire1
            #4

            After some investigation I realized that the application has different default styles depending on the host system. After adding -style Fusion to the start command on the embedded system it behaves exactly as on my dev machine.

            It doesnt explain why the StyleSheet code doesnt work but it solves my issue.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved