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. How to auto connect serial port without any clicking on button ?
Forum Updated to NodeBB v4.3 + New Features

How to auto connect serial port without any clicking on button ?

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 1.2k Views
  • 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.
  • huythyH Offline
    huythyH Offline
    huythy
    wrote on last edited by huythy
    #1

    Hello everyone, I have a question .
    I wonder if Qt can auto connect a device through serial by itself ?
    I mean when i run program, qt looks for a serial port - just one port as the same time, and auto connect it without any clicking on button.
    Please help me answer this question. Thank you !

    jsulmJ 1 Reply Last reply
    0
    • huythyH huythy

      Hello everyone, I have a question .
      I wonder if Qt can auto connect a device through serial by itself ?
      I mean when i run program, qt looks for a serial port - just one port as the same time, and auto connect it without any clicking on button.
      Please help me answer this question. Thank you !

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

      @huythy Not sure what the problem is. When your app starts then just connect the serial port - there is no need for any buttons, you can use serial port even in command line apps without any GUI.

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

      1 Reply Last reply
      2
      • dheerendraD Offline
        dheerendraD Offline
        dheerendra
        Qt Champions 2022
        wrote on last edited by
        #3

        You need to write a code for this. During the startup of the program you can call function which connects to SerialPort. By looking at your explanation, you are clicking on button and this click must be connected a slot(function) which does connections to serial port. In scenario call the slot directly. Slot is like any other member function. No special treatment!!! for slot.

        Dheerendra
        @Community Service
        Certified Qt Specialist
        http://www.pthinks.com

        1 Reply Last reply
        4
        • huythyH Offline
          huythyH Offline
          huythy
          wrote on last edited by
          #4

          I understood that issue, my code is running well. Thank you all of you very much.

          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