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. QWidget::isVisible() not working on linux
Forum Updated to NodeBB v4.3 + New Features

QWidget::isVisible() not working on linux

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 4.7k 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.
  • B Offline
    B Offline
    brucewuu
    wrote on last edited by
    #1

    when I test fWidget->isVisible() in centos , It always returns false even if the fWidget is shown . While I use !fWidget->isHidden(); it works . What's the problem ? anyone knows the reason and meets the same problem before ? thanks ~~

    wish all the best to you from
    bruce wuu
    Autodesk China Inc.
    SW Developer
    M&E Product Developerment Group
    Work 137 6411 8921
    bruce.wu@autodesk.com

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lgeyer
      wrote on last edited by
      #2

      Is this a top-level widget?

      1 Reply Last reply
      0
      • B Offline
        B Offline
        brucewuu
        wrote on last edited by
        #3

        no , it is not top-level widget . But I am sure it is shown . Actually it is a QGLWidget() , and I draw a lot of models inside it .

        wish all the best to you from
        bruce wuu
        Autodesk China Inc.
        SW Developer
        M&E Product Developerment Group
        Work 137 6411 8921
        bruce.wu@autodesk.com

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dbzhang800
          wrote on last edited by
          #4

          Can you give us a small example which reproduce the problem?

          @
          inline bool QWidget::isVisible() const
          { return testAttribute(Qt::WA_WState_Visible); }

          inline bool QWidget::isHidden() const
          { return testAttribute(Qt::WA_WState_Hidden); }
          @

          1 Reply Last reply
          0
          • B Offline
            B Offline
            brucewuu
            wrote on last edited by
            #5

            thank you , guys , but I can't give a example , because this is what I met in our current project , the
            project is very large . I wonder whether this is because the fWidget is not a window , it is the child of some widget , I tested using isVisble on the child of visible widgets , it can work . so It is really strange why it can not work here .

            wish all the best to you from
            bruce wuu
            Autodesk China Inc.
            SW Developer
            M&E Product Developerment Group
            Work 137 6411 8921
            bruce.wu@autodesk.com

            1 Reply Last reply
            0
            • D Offline
              D Offline
              dbzhang800
              wrote on last edited by
              #6

              The infomation you provited is too limited, so I think other people cannot give you some useful hint.

              If you are unsure whether it related to something,you can write a small program to test it.

              1 Reply Last reply
              0
              • B Offline
                B Offline
                brucewuu
                wrote on last edited by
                #7

                thank you , MR 2 , I have tested it with the small program , but didn't find any strange result . So thank you again , Mr 2 , just ignore this .

                wish all the best to you from
                bruce wuu
                Autodesk China Inc.
                SW Developer
                M&E Product Developerment Group
                Work 137 6411 8921
                bruce.wu@autodesk.com

                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