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. embed a qdialog into qwidget (Qt c++)
Forum Updated to NodeBB v4.3 + New Features

embed a qdialog into qwidget (Qt c++)

Scheduled Pinned Locked Moved Unsolved General and Desktop
16 Posts 4 Posters 1.7k Views 3 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.
  • Pl45m4P Pl45m4

    @Kaguro said in embed a qdialog into qwidget (Qt c++):

    the edges start to creep while moving, so they don't stay rigid

    Do they leave a trace on the screen? Or is it some blur effect? Can you show it?
    Could be an issue with your stylesheet. Is it the same, when you don't set the stylesheet?

    KaguroK Offline
    KaguroK Offline
    Kaguro
    wrote on last edited by
    #7

    @Pl45m4 I would rather say that the edges of the widget slide inwards. I tried it without
    stylesheet (I just gave it a background-color that dont be transparent) and it's the same result:( Sure here is what the widget do while moving it:
    video

    Axel SpoerlA 1 Reply Last reply
    0
    • KaguroK Kaguro

      @Pl45m4 I would rather say that the edges of the widget slide inwards. I tried it without
      stylesheet (I just gave it a background-color that dont be transparent) and it's the same result:( Sure here is what the widget do while moving it:
      video

      Axel SpoerlA Offline
      Axel SpoerlA Offline
      Axel Spoerl
      Moderators
      wrote on last edited by
      #8

      @Kaguro
      The video looks like a rendering glitch to me, which becomes more obvious on a widget without frame margins.
      But since everything gets rendered nicely when the drag stops, I have the impression that the glitch is not Qt related.
      In essence, there's no difference in how a widget is painted during or after a drag.

      The fact having a style sheet or not doesn't influence the glitch, would fit into this picture.

      Have you tried the reproducer on different computers with fast/slow graphics?

      Software Engineer
      The Qt Company, Oslo

      KaguroK 1 Reply Last reply
      0
      • Axel SpoerlA Axel Spoerl

        @Kaguro
        The video looks like a rendering glitch to me, which becomes more obvious on a widget without frame margins.
        But since everything gets rendered nicely when the drag stops, I have the impression that the glitch is not Qt related.
        In essence, there's no difference in how a widget is painted during or after a drag.

        The fact having a style sheet or not doesn't influence the glitch, would fit into this picture.

        Have you tried the reproducer on different computers with fast/slow graphics?

        KaguroK Offline
        KaguroK Offline
        Kaguro
        wrote on last edited by
        #9

        @Axel-Spoerl
        hmm interesting. Would it depend on the computer? I've only tested it on my work machine, but I'll test it at home too, where I have a faster computer. But it needs faster graphics card? Does this render require that much? What is interesting too: If i set the widget's setContentMargins, higher the number I set, the less the glitch occurs. In the video the contentmargins are 0.

        Axel SpoerlA 1 Reply Last reply
        0
        • KaguroK Kaguro

          @Axel-Spoerl
          hmm interesting. Would it depend on the computer? I've only tested it on my work machine, but I'll test it at home too, where I have a faster computer. But it needs faster graphics card? Does this render require that much? What is interesting too: If i set the widget's setContentMargins, higher the number I set, the less the glitch occurs. In the video the contentmargins are 0.

          Axel SpoerlA Offline
          Axel SpoerlA Offline
          Axel Spoerl
          Moderators
          wrote on last edited by
          #10

          @Kaguro
          I am speculating now. I can't see any glitch on my PC, but it's a fast one with a native NVIDIA driver.
          The glitch on the video (watched in slomo) looks like rendering on the "new" position starts, before rendering on the "old" position stops. And as said before, technically there is no difference between rendering "on the move" and "at the end of the move". Wouldn't make sense - we can't predict, when a user stops moving.

          Software Engineer
          The Qt Company, Oslo

          KaguroK 1 Reply Last reply
          0
          • Axel SpoerlA Axel Spoerl

            @Kaguro
            I am speculating now. I can't see any glitch on my PC, but it's a fast one with a native NVIDIA driver.
            The glitch on the video (watched in slomo) looks like rendering on the "new" position starts, before rendering on the "old" position stops. And as said before, technically there is no difference between rendering "on the move" and "at the end of the move". Wouldn't make sense - we can't predict, when a user stops moving.

            KaguroK Offline
            KaguroK Offline
            Kaguro
            wrote on last edited by
            #11

            @Axel-Spoerl
            I understand. I will try it at home and report back!
            it's just not so nice, just that the edges don't glitch when i do it with QDialog (Of course, then they are not in the same window).

            1 Reply Last reply
            0
            • KaguroK Kaguro

              HI Guys!
              I would like to ask you how I could make a QWidget-based application where the QDialogs are not opened as separate windows but within the main QWidget? I'd like to keep mouse moveability as default for QDialogs. I would like the contents behind it to be grayed out as long as the QDialog is open, and when I say "ok" I can get back what was pressed in the same way as with a QDialog.

              In short: As with games, a message window does not open as a separate window, but within the game's main window.

              I tried the checked answer here (https://stackoverflow.com/questions/17163585/simple-way-to-embed-a-qdialog-into-a-qwidget), but somehow I must have messed it up because it didn't want to work for me :(

              Thank for your help!

              KaguroK Offline
              KaguroK Offline
              Kaguro
              wrote on last edited by Kaguro
              #12

              @Axel-Spoerl @Pl45m4 hmmm interesting at my home (much faster video card and better in everything) and it doesn't works perfectly i see the glitch here too :(

              1 Reply Last reply
              0
              • KaguroK Kaguro

                HI Guys!
                I would like to ask you how I could make a QWidget-based application where the QDialogs are not opened as separate windows but within the main QWidget? I'd like to keep mouse moveability as default for QDialogs. I would like the contents behind it to be grayed out as long as the QDialog is open, and when I say "ok" I can get back what was pressed in the same way as with a QDialog.

                In short: As with games, a message window does not open as a separate window, but within the game's main window.

                I tried the checked answer here (https://stackoverflow.com/questions/17163585/simple-way-to-embed-a-qdialog-into-a-qwidget), but somehow I must have messed it up because it didn't want to work for me :(

                Thank for your help!

                KaguroK Offline
                KaguroK Offline
                Kaguro
                wrote on last edited by
                #13

                @Axel-Spoerl @Pl45m4
                Do you think I can do anything with this behavior?

                Axel SpoerlA 1 Reply Last reply
                0
                • KaguroK Kaguro

                  @Axel-Spoerl @Pl45m4
                  Do you think I can do anything with this behavior?

                  Axel SpoerlA Offline
                  Axel SpoerlA Offline
                  Axel Spoerl
                  Moderators
                  wrote on last edited by
                  #14

                  @Kaguro
                  I completely fail to reproduce that.
                  If you are able to make a video, you could certainly file a bug report at https://bugreports.qt.io

                  Software Engineer
                  The Qt Company, Oslo

                  KaguroK 1 Reply Last reply
                  0
                  • Axel SpoerlA Axel Spoerl

                    @Kaguro
                    I completely fail to reproduce that.
                    If you are able to make a video, you could certainly file a bug report at https://bugreports.qt.io

                    KaguroK Offline
                    KaguroK Offline
                    Kaguro
                    wrote on last edited by
                    #15

                    @Axel-Spoerl It's very weird to me that it works differently at you. Maybe can you also show in a video what you see? (I will try make a bug report but for some reason I think this is not a bug, especially if you don't see this behavior)

                    Axel SpoerlA 1 Reply Last reply
                    0
                    • KaguroK Kaguro

                      @Axel-Spoerl It's very weird to me that it works differently at you. Maybe can you also show in a video what you see? (I will try make a bug report but for some reason I think this is not a bug, especially if you don't see this behavior)

                      Axel SpoerlA Offline
                      Axel SpoerlA Offline
                      Axel Spoerl
                      Moderators
                      wrote on last edited by
                      #16

                      @Kaguro
                      Well, even if the bug will be closed without a fix, we should have a look at it.

                      Software Engineer
                      The Qt Company, Oslo

                      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