Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QMenu popup does not work on Linux

QMenu popup does not work on Linux

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 1.6k 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.
  • A Offline
    A Offline
    ajaxcrypto
    wrote on last edited by
    #1

    I am using QMenu popup to show a popup list of entries on the click of a button (QToolButton). It works fine on windows but on Linux (Ubuntu 16.04), I get QPainter invalid errors whenever the button is clicked and no menu gets displayed. The Linux machine login is done from a Windows 10/7 machine using MobaXTerm through SSH and then running a local XMing on windows. Then, starting up the application using ./app.out starts and the GUI gets displayed (working absolutely fine, identical to Windows). However, on clicking the QToolButton, no menu gets displayed, on console I see messages about invalid QPainter. What is wrong? Is the problem with the setup itself?

    jsulmJ 1 Reply Last reply
    0
    • A ajaxcrypto

      I am using QMenu popup to show a popup list of entries on the click of a button (QToolButton). It works fine on windows but on Linux (Ubuntu 16.04), I get QPainter invalid errors whenever the button is clicked and no menu gets displayed. The Linux machine login is done from a Windows 10/7 machine using MobaXTerm through SSH and then running a local XMing on windows. Then, starting up the application using ./app.out starts and the GUI gets displayed (working absolutely fine, identical to Windows). However, on clicking the QToolButton, no menu gets displayed, on console I see messages about invalid QPainter. What is wrong? Is the problem with the setup itself?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @ajaxcrypto Is it working if you start the app directly on the Linux machine without SSH?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • A Offline
        A Offline
        ajaxcrypto
        wrote on last edited by
        #3

        On running directly on Ubuntu 16.04 with Qt 5.9.0, I can see the popup but I cannot see any entries/text in them, though clicking on them works (only a white blank popup comes). In console I see lots of "Painter not active" and "Unbalanced save/restore" messages. I am not overriding paint method for either the button or the menu.

        jsulmJ 1 Reply Last reply
        0
        • A ajaxcrypto

          On running directly on Ubuntu 16.04 with Qt 5.9.0, I can see the popup but I cannot see any entries/text in them, though clicking on them works (only a white blank popup comes). In console I see lots of "Painter not active" and "Unbalanced save/restore" messages. I am not overriding paint method for either the button or the menu.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @ajaxcrypto Strange. Do any Qt app packaged by Ubuntu work? For example VLC.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • A Offline
            A Offline
            ajaxcrypto
            wrote on last edited by
            #5

            VLC is working fine. But any QMenu instance whether it is context menu or QToolButton menu, comes blank without any text for it and throws a series of invalid QPainter errors.

            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