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. Pass hex values as int in Pyqt signals and slots
Forum Updated to NodeBB v4.3 + New Features

Pass hex values as int in Pyqt signals and slots

Scheduled Pinned Locked Moved Unsolved Qt for Python
3 Posts 3 Posters 364 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.
  • P Offline
    P Offline
    Praanesh
    wrote on last edited by
    #1

    How do I pass a hexadecimal value in a qt signal and use it in a slot in PyQt5 signals and slots method

    JonBJ 1 Reply Last reply
    0
    • P Praanesh

      How do I pass a hexadecimal value in a qt signal and use it in a slot in PyQt5 signals and slots method

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

      @Praanesh
      This has been asked before. There is no such as "a hexadecimal value", as a type, not in C++ and not in Python. Either you have a number (integer) or perhaps you have a string which is a representation in hex of a number. Which is it? What type is it? That's what you pass in the signal/slot.

      1 Reply Last reply
      3
      • Kent-DorfmanK Offline
        Kent-DorfmanK Offline
        Kent-Dorfman
        wrote on last edited by
        #3

        function.something.emit(0x1234)
        or
        function.something.emit("hex string")

        add "type checking" logic in the slot function since in python types are infererd from the rvalue of the expression.

        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