Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. German
  4. Qt Stylesheets
Qt 6.12 LTS is out! See what's new in the release blog

Qt Stylesheets

Scheduled Pinned Locked Moved Solved German
39 Posts 3 Posters 34.1k 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

    @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
                • G Galilio

                  @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 Offline
                  raven-worxR Offline
                  raven-worx
                  Moderators
                  wrote on last edited by
                  #34

                  @Galilio
                  ok, dann versuch mal das:

                  dialog->setWindowFlags( Qt::Dialog | Qt::FramelessWindowHint | Qt::CustomizeWindowHint );
                  

                  --- 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
                    ok, dann versuch mal das:

                    dialog->setWindowFlags( Qt::Dialog | Qt::FramelessWindowHint | Qt::CustomizeWindowHint );
                    
                    G Offline
                    G Offline
                    Galilio
                    wrote on last edited by
                    #35

                    @raven-worx said in Qt Stylesheets:

                    dialog->setWindowFlags( Qt::Dialog | Qt::FramelessWindowHint | Qt::CustomizeWindowHint );

                    Hi,

                    1000000000 dank
                    So funktioniert wie es sein muss:

                    	dialog->setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint | Qt::CustomizeWindowHint);
                    	dialog->setAttribute(Qt::WA_TranslucentBackground);
                    

                    Danke noch mal :-)

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

                      @Galilio
                      ok, dann versuch mal das:

                      dialog->setWindowFlags( Qt::Dialog | Qt::FramelessWindowHint | Qt::CustomizeWindowHint );
                      
                      G Offline
                      G Offline
                      Galilio
                      wrote on last edited by
                      #36

                      @raven-worx

                      Sorry
                      ich habe es noch eine Frage:
                      Es geht eigentlich um das gleiche Thematik:
                      Die Application und der Dialog sind gleich designed.
                      Damit die GUI mittels Maus bewegt werden können müssen folgende Fkt überschrieben werden:
                      void mousePressEvent(QMouseEvent* event);
                      void mouseMoveEvent(QMouseEvent* event);
                      void mouseReleaseEvent(QMouseEvent* event);

                      Meine Frage: da es sich dieses Fkt bei der App "class" so wie bei der Dialog "class" gleich implementiert sind, gibt es eine möglichkeit diese doppelt code zu verhindern in dem es nur einmal implementiert werden?

                      raven-worxR 1 Reply Last reply
                      0
                      • G Galilio

                        @raven-worx

                        Sorry
                        ich habe es noch eine Frage:
                        Es geht eigentlich um das gleiche Thematik:
                        Die Application und der Dialog sind gleich designed.
                        Damit die GUI mittels Maus bewegt werden können müssen folgende Fkt überschrieben werden:
                        void mousePressEvent(QMouseEvent* event);
                        void mouseMoveEvent(QMouseEvent* event);
                        void mouseReleaseEvent(QMouseEvent* event);

                        Meine Frage: da es sich dieses Fkt bei der App "class" so wie bei der Dialog "class" gleich implementiert sind, gibt es eine möglichkeit diese doppelt code zu verhindern in dem es nur einmal implementiert werden?

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

                        @Galilio said in Qt Stylesheets:

                        Meine Frage: da es sich dieses Fkt bei der App "class" so wie bei der Dialog "class" gleich implementiert sind, gibt es eine möglichkeit diese doppelt code zu verhindern in dem es nur einmal implementiert werden?

                        Wenn es möglich ist, dass beide eine gemeinsame Basis-Klasse haben, dann ja.
                        Ansonsten könntest du preprocessor macros verwenden.

                        --- 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:

                          Meine Frage: da es sich dieses Fkt bei der App "class" so wie bei der Dialog "class" gleich implementiert sind, gibt es eine möglichkeit diese doppelt code zu verhindern in dem es nur einmal implementiert werden?

                          Wenn es möglich ist, dass beide eine gemeinsame Basis-Klasse haben, dann ja.
                          Ansonsten könntest du preprocessor macros verwenden.

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

                          @raven-worx said in Qt Stylesheets:

                          preprocessor macros

                          und wie kann ich den preprocessor in diesem Zusammenhang anwenden ?
                          :-(

                          raven-worxR 1 Reply Last reply
                          0
                          • G Galilio

                            @raven-worx said in Qt Stylesheets:

                            preprocessor macros

                            und wie kann ich den preprocessor in diesem Zusammenhang anwenden ?
                            :-(

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

                            @Galilio

                            #define MOUSE_PRESS_CODE if( event->button() == Qt::LeftButton )\
                                 {\
                                         hotSpot = this->mapFromGlobal(event->globalPos());\
                                         event->accept();\
                                         return;\
                                 }
                            ...
                            void MyWidget::mousePressEvent( QMouseEvent* event )
                            {
                                 MOUSE_PRESS_CODE
                                 BaseClass::mousePressEvent( event );
                            }
                            

                            für mehr infos => google

                            --- 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
                            1

                            • Login

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