Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. German
  4. Qt Stylesheets
Forum Updated to NodeBB v4.3 + New Features

Qt Stylesheets

Scheduled Pinned Locked Moved Solved German
39 Posts 3 Posters 17.2k Views
  • 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.
  • G Galilio

    Guten morgen Zusammen,

    eine Frage zu dem Thema.

    ich habe einen Dialog in MyApplication.
    In dieses Dialog möchte ich auch das gleiche Design wie MyApplication
    Dieses Dialog wird so gerufen:

    void MyApplication::showAboutApplication()
    {
    AboutDialog *dialog = new AboutDiaolog(this);
    dialog->setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint);
    dialog->setAttribute(Qt::WA_TranslucentBackground);
    dialog->exec();
    delete dialog;
    
    }
    

    Das komisch daran ist, dass das Dialog abgeschnitten wird.
    was ist daran falsch?

    danke in voraus

    raven-worxR Offline
    raven-worxR Offline
    raven-worx
    Moderators
    wrote on last edited by
    #14

    @Galilio
    ist ein Layout auf dem Dialog gesetzt? Wenn ja, dann:

    void MyApplication::showAboutApplication()
    {
    AboutDialog *dialog = new AboutDiaolog(this);
    dialog->setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint);
    dialog->setAttribute(Qt::WA_TranslucentBackground);
    dialog->resize( dialog->sizeHint() );  // <<<<<<<<<<<<
    dialog->exec();
    delete dialog;
    }
    

    --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
    If you have a question please use the forum so others can benefit from the solution in the future

    1 Reply Last reply
    0
    • G Offline
      G Offline
      Galilio
      wrote on last edited by
      #15

      Hallo,

      es passiert nichts.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        Galilio
        wrote on last edited by
        #16

        Mit passiert nichts meine ich: Dialog wird nicht mal gezeigt

        raven-worxR 1 Reply Last reply
        0
        • G Galilio

          Mit passiert nichts meine ich: Dialog wird nicht mal gezeigt

          raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #17

          @Galilio
          du hast geschrieben

          Das komisch daran ist, dass das Dialog abgeschnitten wird.

          ???

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          G 1 Reply Last reply
          0
          • raven-worxR raven-worx

            @Galilio
            du hast geschrieben

            Das komisch daran ist, dass das Dialog abgeschnitten wird.

            ???

            G Offline
            G Offline
            Galilio
            wrote on last edited by
            #18

            @raven-worx

            1. Ohne das:
            dialog->resize(dialog->sizeHint());
            

            Dialog ist abgeschnitten.

            1. Mit:
            dialog->resize(dialog->sizeHint());
            

            wird nichts gezeigt

            raven-worxR 1 Reply Last reply
            0
            • G Galilio

              @raven-worx

              1. Ohne das:
              dialog->resize(dialog->sizeHint());
              

              Dialog ist abgeschnitten.

              1. Mit:
              dialog->resize(dialog->sizeHint());
              

              wird nichts gezeigt

              raven-worxR Offline
              raven-worxR Offline
              raven-worx
              Moderators
              wrote on last edited by
              #19

              @Galilio
              dann verwendest du kein Layout in dialog?

              Mein Vorschlag funktioniert nur wenn du ein Layout verwendest (oder sizeHint() überladen hast). Ohne Layout musst du den Dialog selbst resizen bis es passt.

              --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
              If you have a question please use the forum so others can benefit from the solution in the future

              G 1 Reply Last reply
              0
              • raven-worxR raven-worx

                @Galilio
                dann verwendest du kein Layout in dialog?

                Mein Vorschlag funktioniert nur wenn du ein Layout verwendest (oder sizeHint() überladen hast). Ohne Layout musst du den Dialog selbst resizen bis es passt.

                G Offline
                G Offline
                Galilio
                wrote on last edited by
                #20

                @raven-worx

                doch ich verwende einen Layout und zwar den Grid Layout.

                raven-worxR 1 Reply Last reply
                0
                • G Galilio

                  @raven-worx

                  doch ich verwende einen Layout und zwar den Grid Layout.

                  raven-worxR Offline
                  raven-worxR Offline
                  raven-worx
                  Moderators
                  wrote on last edited by
                  #21

                  @Galilio
                  was gibt folgendes zurück?

                  qDebug() << dialog->layout();
                  

                  --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                  If you have a question please use the forum so others can benefit from the solution in the future

                  G 1 Reply Last reply
                  0
                  • raven-worxR raven-worx

                    @Galilio
                    was gibt folgendes zurück?

                    qDebug() << dialog->layout();
                    
                    G Offline
                    G Offline
                    Galilio
                    wrote on last edited by
                    #22

                    @raven-worx

                    QGridLayout(0x142624d8, name = "gridLayout_2")

                    raven-worxR 1 Reply Last reply
                    0
                    • G Galilio

                      @raven-worx

                      QGridLayout(0x142624d8, name = "gridLayout_2")

                      raven-worxR Offline
                      raven-worxR Offline
                      raven-worx
                      Moderators
                      wrote on last edited by
                      #23

                      @Galilio
                      hmm...strange.
                      Dann dürfte irgendein widget in der Hierachie nicht sizeHint() implementiert haben, oder eine maximum size gesetzt sein? ... kA
                      Bleibt wohl nur das "händische resizen".

                      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                      If you have a question please use the forum so others can benefit from the solution in the future

                      G 1 Reply Last reply
                      0
                      • raven-worxR raven-worx

                        @Galilio
                        hmm...strange.
                        Dann dürfte irgendein widget in der Hierachie nicht sizeHint() implementiert haben, oder eine maximum size gesetzt sein? ... kA
                        Bleibt wohl nur das "händische resizen".

                        G Offline
                        G Offline
                        Galilio
                        wrote on last edited by
                        #24

                        @raven-worx
                        jetzt wenn ich das anwende:

                        	AboutDialog *dialog = new AboutDialog(this);
                        	dialog->setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint);
                        	dialog->setAttribute(Qt::WA_TranslucentBackground);
                        	dialog->resize(dialog->sizeHint());
                        

                        oder

                        	AboutDialog *dialog = new AboutDialog(this);
                        	dialog->setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint);
                        	dialog->setAttribute(Qt::WA_TranslucentBackground);
                        

                        --> Dialog wird gar nicht gezeigt
                        Ich setze auch nirgend eine Minimum bzw. Maximum

                        raven-worxR 1 Reply Last reply
                        0
                        • G Galilio

                          @raven-worx
                          jetzt wenn ich das anwende:

                          	AboutDialog *dialog = new AboutDialog(this);
                          	dialog->setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint);
                          	dialog->setAttribute(Qt::WA_TranslucentBackground);
                          	dialog->resize(dialog->sizeHint());
                          

                          oder

                          	AboutDialog *dialog = new AboutDialog(this);
                          	dialog->setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint);
                          	dialog->setAttribute(Qt::WA_TranslucentBackground);
                          

                          --> Dialog wird gar nicht gezeigt
                          Ich setze auch nirgend eine Minimum bzw. Maximum

                          raven-worxR Offline
                          raven-worxR Offline
                          raven-worx
                          Moderators
                          wrote on last edited by
                          #25

                          @Galilio said in Qt Stylesheets:

                          dialog->resize(dialog->sizeHint());

                          dialog->resize( QSize(x,y) ); //<< passende size
                          

                          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                          If you have a question please use the forum so others can benefit from the solution in the future

                          G 1 Reply Last reply
                          0
                          • raven-worxR raven-worx

                            @Galilio said in Qt Stylesheets:

                            dialog->resize(dialog->sizeHint());

                            dialog->resize( QSize(x,y) ); //<< passende size
                            
                            G Offline
                            G Offline
                            Galilio
                            wrote on last edited by
                            #26

                            @raven-worx
                            Dialog wird trotzdem nicht gezeigt

                            raven-worxR 1 Reply Last reply
                            0
                            • G Galilio

                              @raven-worx
                              Dialog wird trotzdem nicht gezeigt

                              raven-worxR Offline
                              raven-worxR Offline
                              raven-worx
                              Moderators
                              wrote on last edited by
                              #27

                              @Galilio
                              also sobald dein Dialog resized wird, wird er nicht mehr gezeigt?!
                              Dann ist irgendwas mit deiner Implementierung nicht in Ordnung.

                              --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                              If you have a question please use the forum so others can benefit from the solution in the future

                              G 2 Replies Last reply
                              0
                              • raven-worxR raven-worx

                                @Galilio
                                also sobald dein Dialog resized wird, wird er nicht mehr gezeigt?!
                                Dann ist irgendwas mit deiner Implementierung nicht in Ordnung.

                                G Offline
                                G Offline
                                Galilio
                                wrote on last edited by
                                #28

                                @raven-worx
                                Mit resize oder ohne
                                Dialog wird nicht gezeigt.
                                Wenn ich das ganze auskommentiere :

                                	AboutDialog *dialog = new AboutDialog(this);
                                	//dialog->setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint);
                                	//dialog->setAttribute(Qt::WA_TranslucentBackground);
                                	//dialog->resize(QSize(250,260));
                                	qDebug() << dialog->layout();
                                	dialog->exec();
                                	delete dialog;
                                

                                --> Dialog wird gezeigt

                                raven-worxR 1 Reply Last reply
                                0
                                • raven-worxR raven-worx

                                  @Galilio
                                  also sobald dein Dialog resized wird, wird er nicht mehr gezeigt?!
                                  Dann ist irgendwas mit deiner Implementierung nicht in Ordnung.

                                  G Offline
                                  G Offline
                                  Galilio
                                  wrote on last edited by
                                  #29

                                  @raven-worx
                                  Warum sollte in der Implementierung was falsch sein.
                                  Ich tue nicht anders als das Objeckt zu erzeugen mehr nicht.

                                  1 Reply Last reply
                                  0
                                  • G Galilio

                                    @raven-worx
                                    Mit resize oder ohne
                                    Dialog wird nicht gezeigt.
                                    Wenn ich das ganze auskommentiere :

                                    	AboutDialog *dialog = new AboutDialog(this);
                                    	//dialog->setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint);
                                    	//dialog->setAttribute(Qt::WA_TranslucentBackground);
                                    	//dialog->resize(QSize(250,260));
                                    	qDebug() << dialog->layout();
                                    	dialog->exec();
                                    	delete dialog;
                                    

                                    --> Dialog wird gezeigt

                                    raven-worxR Offline
                                    raven-worxR Offline
                                    raven-worx
                                    Moderators
                                    wrote on last edited by
                                    #30

                                    @Galilio said in Qt Stylesheets:

                                    Mit resize oder ohne
                                    Dialog wird nicht gezeigt.
                                    Wenn ich das ganze auskommentiere :

                                    liegt ws nur an der Zeile mit Qt::WA_TranslucentBackground?? Kannst du das mal ausprobieren.

                                    Läuft irgendeine OpenGL Anwendung nebenbei?

                                    --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                                    If you have a question please use the forum so others can benefit from the solution in the future

                                    G 1 Reply Last reply
                                    0
                                    • raven-worxR raven-worx

                                      @Galilio said in Qt Stylesheets:

                                      Mit resize oder ohne
                                      Dialog wird nicht gezeigt.
                                      Wenn ich das ganze auskommentiere :

                                      liegt ws nur an der Zeile mit Qt::WA_TranslucentBackground?? Kannst du das mal ausprobieren.

                                      Läuft irgendeine OpenGL Anwendung nebenbei?

                                      G Offline
                                      G Offline
                                      Galilio
                                      wrote on last edited by
                                      #31

                                      @raven-worx said in Qt Stylesheets:

                                      liegt ws nur an der Zeile mit Qt::WA_TranslucentBackground??
                                      @ Was meinst du bitte damit?
                                      Läuft irgendeine OpenGL Anwendung nebenbei?
                                      @ Nein

                                      raven-worxR 1 Reply Last reply
                                      0
                                      • G Galilio

                                        @raven-worx said in Qt Stylesheets:

                                        liegt ws nur an der Zeile mit Qt::WA_TranslucentBackground??
                                        @ Was meinst du bitte damit?
                                        Läuft irgendeine OpenGL Anwendung nebenbei?
                                        @ Nein

                                        raven-worxR Offline
                                        raven-worxR Offline
                                        raven-worx
                                        Moderators
                                        wrote on last edited by
                                        #32

                                        @Galilio said in Qt Stylesheets:

                                        Was meinst du bitte damit?

                                        dass es ws nur an deiser einen Zeile liegt.

                                        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                                        If you have a question please use the forum so others can benefit from the solution in the future

                                        G 1 Reply Last reply
                                        0
                                        • raven-worxR raven-worx

                                          @Galilio said in Qt Stylesheets:

                                          Was meinst du bitte damit?

                                          dass es ws nur an deiser einen Zeile liegt.

                                          G Offline
                                          G Offline
                                          Galilio
                                          wrote on last edited by
                                          #33

                                          @raven-worx
                                          wenn ich so schreibe:

                                          	AboutDialog *dialog = new AboutDialog(this);
                                          	//dialog->setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint);
                                          	dialog->setAttribute(Qt::WA_TranslucentBackground);
                                          	//dialog->resize(QSize(250,260));
                                          	qDebug() << dialog->layout();
                                          	dialog->exec();
                                          	delete dialog;
                                          

                                          --> Dialog wird gezeigt
                                          und wenn ich so schreibe:

                                          	AboutDialog *dialog = new AboutDialog(this);
                                          	dialog->setWindowFlags(Qt::CustomizeWindowHint | Qt::FramelessWindowHint);
                                          	//dialog->setAttribute(Qt::WA_TranslucentBackground);
                                          	//dialog->resize(QSize(250,260));
                                          	qDebug() << dialog->layout();
                                          	dialog->exec();
                                          	delete dialog;
                                          

                                          --> Dialog wird nicht gezeigt

                                          raven-worxR 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