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. QT GUI question
Forum Updated to NodeBB v4.3 + New Features

QT GUI question

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 655 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.
  • K Offline
    K Offline
    KB1DC
    wrote on last edited by
    #1

    I'm very new to QT so please bear with me. In the examples that QT gives there is a project called terminal which basically sets up the serial port. I would like my main GUI window (mainwindow.cpp) that I created to call this project by importing the files and treat it as a second (main) window when I choose a Qfile tag under my main GUI. I'm having problems due to the fact that the file terminal is itself a main window (which I would like to keep as opposed to a QT widget) I'm not sure how to call the file terminal (main window) in my mainwindow.cpp. Looking for some help on this.

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

      Hi and welcome to devnet,

      Nothing forbids you to have several QMainWindow derived class in your project although it's unusual.

      As for the naming, you should choose another name for your own main window class.

      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
      • K Offline
        K Offline
        KB1DC
        wrote on last edited by
        #3

        Thank you could you give me a snippet of code one would use in the mainwindow.cpp to call another mainwindow piece of code. I learn by example.

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

          Forget the fact that they are both QMainWindow based class, use it like any other widget.

          The Qt Documentation is full of examples.

          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

          • Login

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