Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. PyQt5 Widget crashes with custom context menu events?
Forum Updated to NodeBB v4.3 + New Features

PyQt5 Widget crashes with custom context menu events?

Scheduled Pinned Locked Moved Unsolved Qt for Python
5 Posts 4 Posters 578 Views 1 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.
  • M Offline
    M Offline
    MistaGoat05
    wrote on last edited by
    #1

    So I'm following along with the beginner PyQt tutorials using PyQt5 and I made it to the context menus tutorial but when I try to link an action in the context menu it breaks. All of the Context Menu Actions return the same thing and the program crashes when I select any of them, I attached a picture of the code and error ![Code]([image https://imgbox.com/1HHagDcT]

    jsulmJ SGaistS 2 Replies Last reply
    0
    • SGaistS SGaist moved this topic from Language Bindings on
    • M MistaGoat05

      So I'm following along with the beginner PyQt tutorials using PyQt5 and I made it to the context menus tutorial but when I try to link an action in the context menu it breaks. All of the Context Menu Actions return the same thing and the program crashes when I select any of them, I attached a picture of the code and error ![Code]([image https://imgbox.com/1HHagDcT]

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

      @MistaGoat05 said in PyQt5 Widget crashes with custom context menu events?:

      I attached a picture of the code and error

      Please post code and error as text not pictures

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

      M 1 Reply Last reply
      1
      • M MistaGoat05

        So I'm following along with the beginner PyQt tutorials using PyQt5 and I made it to the context menus tutorial but when I try to link an action in the context menu it breaks. All of the Context Menu Actions return the same thing and the program crashes when I select any of them, I attached a picture of the code and error ![Code]([image https://imgbox.com/1HHagDcT]

        SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by SGaist
        #3

        @MistaGoat05 Hi,

        Your connect statement is wrong, you're passing a class where you should be passing a function and calling print where you should have the connection type.

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

        1 Reply Last reply
        0
        • jsulmJ jsulm

          @MistaGoat05 said in PyQt5 Widget crashes with custom context menu events?:

          I attached a picture of the code and error

          Please post code and error as text not pictures

          M Offline
          M Offline
          MistaGoat05
          wrote on last edited by
          #4

          @jsulm Sorry, I tried to but I am very new to this and when I pasted the url where it said url it just posted like that

          JonBJ 1 Reply Last reply
          0
          • M MistaGoat05

            @jsulm Sorry, I tried to but I am very new to this and when I pasted the url where it said url it just posted like that

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by JonB
            #5

            @MistaGoat05
            We are asking you kindly not to post any "pictures" of code or error messages. Therefore you won't be using any "url". "Pictures" of code/messages are too hard to look at, and people need to be able to copy the actual text of stuff to help you out. We are asking you do text copy & paste into your posts here --- preferably inside the forum posts' Code tags, which you can achieve by selecting all the block(s) of code text you are pasting and pressing the </> button --- not any screenshots/pictures.

            1 Reply Last reply
            1

            • Login

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