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. black stripes in shapedclock example

black stripes in shapedclock example

Scheduled Pinned Locked Moved Unsolved General and Desktop
25 Posts 5 Posters 7.1k 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.
  • Poor EnglishP Offline
    Poor EnglishP Offline
    Poor English
    wrote on last edited by
    #3

    I am sorry that I took up you precious time,because I can't help your solve the problem, I have not used this strangely shaped dialog,so I came here with a learning attitude,and by the way,I would like to make a small suggestion:since the code of your second test example is concise,why not drag the ellipse aside and show the code?

    I am sorry about my poor English!

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

      Hi
      It looks like a gfx driver issue as there is no real reason for the lines Qt wise.

      Can you show your code for the second test ?
      So we can try run in here and see.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        al072
        wrote on last edited by
        #5

        @mrjj said in black stripes in shapedclock example:

        Hi
        It looks like a gfx driver issue as there is no real reason for the lines Qt wise.
        Can you show your code for the second test ?
        So we can try run in here and see.

        Hi, thank you very much for a quick reply!

        Here is all my code (only two strings of code, the rest is by default):

        #include "widget.h"
        #include "ui_widget.h"
        
        Widget::Widget(QWidget *parent)
            : QWidget(parent)
            , ui(new Ui::Widget)
        {
            QRegion region(rect(), QRegion::Ellipse);
            setMask(region);
             ui->setupUi(this);
        }
        
        Widget::~Widget()
        {
            delete ui;
        }
        

        I wanted to port my big project from MFC to Qt and know i really upset and dont know what to do(( Because my MFC code is using many custom shaped windows...

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by Christian Ehrlicher
          #6

          rect() is not correct here I would guess since in the ctor the size of the widget is not known. Do it in e.g. QWidget::resizeEvent()

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          2
          • A Offline
            A Offline
            al072
            wrote on last edited by
            #7

            @Christian-Ehrlicher said in black stripes in shapedclock example:

            rect() is not correct here I would guess since in the ctor the size of the widget is not known. Do it in e.g. QWidget::resizeEvent()

            Thank you, but this is not a problem that cause a black stripes...
            I tried also like this:

            QRegion region(0,0,300,300, QRegion::Ellipse);
            

            And take a look please on my first post, in default Qt example with the shapedclock i have the same behavior

            1 Reply Last reply
            0
            • Christian EhrlicherC Offline
              Christian EhrlicherC Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by
              #8

              And as @mrjj already told yu it looks like a driver issue since the example works fine for us. Update your graphics driver, try another os.

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              A 1 Reply Last reply
              1
              • Christian EhrlicherC Christian Ehrlicher

                And as @mrjj already told yu it looks like a driver issue since the example works fine for us. Update your graphics driver, try another os.

                A Offline
                A Offline
                al072
                wrote on last edited by
                #9

                @Christian-Ehrlicher said in black stripes in shapedclock example:

                And as @mrjj already told yu it looks like a driver issue since the example works fine for us. Update your graphics driver, try another os.

                Driver is updated, i need a Windows as a target OS. Maybe there is another suggestions?

                1 Reply Last reply
                0
                • Christian EhrlicherC Offline
                  Christian EhrlicherC Offline
                  Christian Ehrlicher
                  Lifetime Qt Champion
                  wrote on last edited by
                  #10

                  @al072 said in black stripes in shapedclock example:

                  Maybe there is another suggestions?

                  What else do you want to hear? It's working fine for us on Linux and Windows with Qt5.15 so it's for sure no Qt problem.

                  Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                  Visit the Qt Academy at https://academy.qt.io/catalog

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

                    Hi
                    What Qt version are you using ? And win 10 or win 7 ?

                    Also, if you try
                    https://doc.qt.io/qt-5/qtwidgets-widgets-shapedclock-example.html

                    (its in Creator directly)

                    you also get these black lines ?

                    I tried that sample on win 10 and win 7 with Qt 5.15 and saw no issues.

                    A 1 Reply Last reply
                    1
                    • mrjjM mrjj

                      Hi
                      What Qt version are you using ? And win 10 or win 7 ?

                      Also, if you try
                      https://doc.qt.io/qt-5/qtwidgets-widgets-shapedclock-example.html

                      (its in Creator directly)

                      you also get these black lines ?

                      I tried that sample on win 10 and win 7 with Qt 5.15 and saw no issues.

                      A Offline
                      A Offline
                      al072
                      wrote on last edited by
                      #12

                      @mrjj said in black stripes in shapedclock example:

                      Hi
                      What Qt version are you using ? And win 10 or win 7 ?

                      Also, if you try
                      https://doc.qt.io/qt-5/qtwidgets-widgets-shapedclock-example.html

                      (its in Creator directly)

                      you also get these black lines ?

                      I tried that sample on win 10 and win 7 with Qt 5.15 and saw no issues.

                      I installed Qt 6.0.0, using Windows 10 and yes i run a sample directly from Creator examples and it cause me an issue

                      jsulmJ 1 Reply Last reply
                      0
                      • A al072

                        @mrjj said in black stripes in shapedclock example:

                        Hi
                        What Qt version are you using ? And win 10 or win 7 ?

                        Also, if you try
                        https://doc.qt.io/qt-5/qtwidgets-widgets-shapedclock-example.html

                        (its in Creator directly)

                        you also get these black lines ?

                        I tried that sample on win 10 and win 7 with Qt 5.15 and saw no issues.

                        I installed Qt 6.0.0, using Windows 10 and yes i run a sample directly from Creator examples and it cause me an issue

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

                        @al072 You should try with Qt 5.15.2 also

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

                        1 Reply Last reply
                        0
                        • Christian EhrlicherC Christian Ehrlicher

                          @al072 said in black stripes in shapedclock example:

                          Maybe there is another suggestions?

                          What else do you want to hear? It's working fine for us on Linux and Windows with Qt5.15 so it's for sure no Qt problem.

                          A Offline
                          A Offline
                          al072
                          wrote on last edited by
                          #14

                          @Christian-Ehrlicher said in black stripes in shapedclock example:

                          @al072 said in black stripes in shapedclock example:

                          Maybe there is another suggestions?

                          What else do you want to hear? It's working fine for us on Linux and Windows with Qt5.15 so it's for sure no Qt problem.

                          Easy man, i am really knew to Qt (the first day), and i am just trying to find out should i use this lib for my project and proceed for commercial using or not.

                          And why are you sure that this is no Qt problem? If it work in one PC and doesn't work in another?
                          If you don't have any suggestions just leave it, thank you anyway

                          And sorry for newbie questions

                          1 Reply Last reply
                          0
                          • Christian EhrlicherC Offline
                            Christian EhrlicherC Offline
                            Christian Ehrlicher
                            Lifetime Qt Champion
                            wrote on last edited by
                            #15

                            This is daily debugging stuff. If it does not work for you but others say it's working for them then you have to search for problems on your side by e.g. using another version, using a working example, use another PC or others.

                            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                            Visit the Qt Academy at https://academy.qt.io/catalog

                            1 Reply Last reply
                            0
                            • A Offline
                              A Offline
                              al072
                              wrote on last edited by
                              #16

                              I found a solution, the problem was in scale and layout settings of windows display, i used a text scale of 175%, if i chose 100% shapedclock example works as expected without a black stripes.

                              But resolution is really small for me, all dialogs and buttons is really small, maube is there any workaround with it? Is it possible to draw a correct QWidget window under 175% text scale in windows settings?

                              1 Reply Last reply
                              1
                              • Christian EhrlicherC Offline
                                Christian EhrlicherC Offline
                                Christian Ehrlicher
                                Lifetime Qt Champion
                                wrote on last edited by Christian Ehrlicher
                                #17

                                Please provide a minimal, compilable example to reproduce the issue and create a bug report with this information.

                                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                                Visit the Qt Academy at https://academy.qt.io/catalog

                                A 1 Reply Last reply
                                1
                                • Christian EhrlicherC Christian Ehrlicher

                                  Please provide a minimal, compilable example to reproduce the issue and create a bug report with this information.

                                  A Offline
                                  A Offline
                                  al072
                                  wrote on last edited by
                                  #18

                                  @Christian-Ehrlicher said in black stripes in shapedclock example:

                                  Please provide a minimal, compilable example to reproduce the issue and create a bug report with this information.

                                  Ok i will make a bug report, but could you please tell ma how to create it and where? Link you provided doesn't work for me

                                  Christian EhrlicherC 1 Reply Last reply
                                  0
                                  • A al072

                                    @Christian-Ehrlicher said in black stripes in shapedclock example:

                                    Please provide a minimal, compilable example to reproduce the issue and create a bug report with this information.

                                    Ok i will make a bug report, but could you please tell ma how to create it and where? Link you provided doesn't work for me

                                    Christian EhrlicherC Offline
                                    Christian EhrlicherC Offline
                                    Christian Ehrlicher
                                    Lifetime Qt Champion
                                    wrote on last edited by
                                    #19

                                    @al072 Fixed the link

                                    Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                                    Visit the Qt Academy at https://academy.qt.io/catalog

                                    1 Reply Last reply
                                    1
                                    • A Offline
                                      A Offline
                                      al072
                                      wrote on last edited by
                                      #20

                                      Here is a bug report : https://bugreports.qt.io/browse/QTBUG-90815

                                      1 Reply Last reply
                                      2
                                      • Christian EhrlicherC Offline
                                        Christian EhrlicherC Offline
                                        Christian Ehrlicher
                                        Lifetime Qt Champion
                                        wrote on last edited by
                                        #21

                                        Thx, do you have a chance to test it with 5.15 to see if this is a regression during Qt6 development?

                                        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                                        Visit the Qt Academy at https://academy.qt.io/catalog

                                        A 1 Reply Last reply
                                        1
                                        • A Offline
                                          A Offline
                                          al072
                                          wrote on last edited by
                                          #22

                                          5.15 behave the same, it seems like it is an old bug

                                          Christian EhrlicherC 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