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. Qobject close and show
Qt 6.11 is out! See what's new in the release blog

Qobject close and show

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 1.8k 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.
  • S Offline
    S Offline
    s002wjh
    wrote on last edited by
    #1

    Is there equivalent functions such as close() show() in the widgets class

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

      Hi
      Since its not visible im not sure what show() or close() should do. ?
      Often you dispose with deletelater
      http://doc.qt.io/qt-5/qobject.html#deleteLater

      What do you need a show() or close() for ?

      S 1 Reply Last reply
      3
      • mrjjM mrjj

        Hi
        Since its not visible im not sure what show() or close() should do. ?
        Often you dispose with deletelater
        http://doc.qt.io/qt-5/qobject.html#deleteLater

        What do you need a show() or close() for ?

        S Offline
        S Offline
        s002wjh
        wrote on last edited by
        #3

        @mrjj

        I like to change my QWidget class to Qobject. but there is -> show() and this->close that's causing error

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

          Hi,

          Why do you want to change your QWidget into QObject ?

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

          S 1 Reply Last reply
          1
          • SGaistS SGaist

            Hi,

            Why do you want to change your QWidget into QObject ?

            S Offline
            S Offline
            s002wjh
            wrote on last edited by
            #5

            @SGaist
            Easier way for me to move to different thread than move function within class to Qobject

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

              Then you can stop immediately. GUI objects should only be accessed in the GUI thread. Moving them around is wrong. Use signals and slots to communicate from threads back to your GUI.

              By the way, you don't move functions between threads, you move objects.

              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
              2

              • Login

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