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. Qt vs. WPF
Forum Update on Monday, May 27th 2025

Qt vs. WPF

Scheduled Pinned Locked Moved General and Desktop
25 Posts 4 Posters 35.0k 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.
  • S Offline
    S Offline
    Satmosc
    wrote on 9 Mar 2011, 11:29 last edited by
    #1

    Hi ,
    First of all this is not a question but somehow I need your advice or idea.

    I can call myself WPF expert (C# too) but due to a lot of problems like (Anti Alias) or Image quality even on .Net4 , I decided to learn QT.
    I found that QML is easy powerful language specially when is mixed with JavaScript but Still a lot of Bugs that need to be fixed but still a programmer can fix them by tricks .

    I see that QML Variables or combined JS QML , act like WPF static resources. ( I cannot find Dynamic Resource equivalent ).

    anyway , WPF looks very nice with Expression blend while QT seeks such a nice and professional graphical editor. (is there any third party ?)

    Also , Code completion is not so well in QT but at least with C++ it is working (VS just support CLI based languages since VS2010) .

    anyway.... I am a newbie to QML , I need your advice or recommendation for books/sites/articles to read..

    Kind Regards

    M.Hatami
    To the Rationalism

    1 Reply Last reply
    1
    • T Offline
      T Offline
      tobias.hunger
      wrote on 9 Mar 2011, 13:42 last edited by
      #2

      Did you look into Qt Creator? It has really good code completion for both C++ and QML. A graphical editor for QML and another one for QWidget based UIs is built in, too.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Satmosc
        wrote on 9 Mar 2011, 14:12 last edited by
        #3

        [quote author="Tobias Hunger" date="1299678151"]Did you look into Qt Creator? It has really good code completion for both C++ and QML. A graphical editor for QML and another one for QWidget based UIs is built in, too.[/quote]
        Thanks , Yes , I already saw it and used it. I have moved and started to migrate a project from WPF to QML (Even it is better to call it a new project but I am making similar looking UI)

        it looks nice but not much . the code completion is a bit slow and lazy but still acceptable.
        but Graphical editor is very simple...

        M.Hatami
        To the Rationalism

        1 Reply Last reply
        0
        • A Offline
          A Offline
          Alicemirror
          wrote on 9 Mar 2011, 14:13 last edited by
          #4

          I subscribe what has wrote Tobias.

          Consider that I tell this as an experienced developer by 40 years (!!!) and in '80-'90 I had been a MS developer, then I worked on some many platforms and environments that I don't remember all. Sure QT is the best choice against VS.
          Do you have taken in consideration the idea to publish your projects on the nokia forum community, so you can share work and knowledge with a lot of people? If you do this, and notify me, I can participate (at least as a follower) to this.
          I think that best of a lot of books can be the shared experience and knowledge between people, the forums and the on-line and off-line documentation about QT, QML and more.

          Enrico Miglino (aka Alicemirror)
          Balearic Dynamics
          Islas Baleares, Ibiza (Spain)
          www.balearicdynamics.com

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Satmosc
            wrote on 9 Mar 2011, 14:25 last edited by
            #5

            @Alicemirror
            I am going to publish it , but I just started it in QT , so , I will do it for sure cause it is opensource (except a core C Part of it).
            by the way thanks for information and recommendations .

            M.Hatami
            To the Rationalism

            1 Reply Last reply
            0
            • A Offline
              A Offline
              Alicemirror
              wrote on 9 Mar 2011, 14:30 last edited by
              #6

              Well, remember to notify me the project address.

              Enrico Miglino (aka Alicemirror)
              Balearic Dynamics
              Islas Baleares, Ibiza (Spain)
              www.balearicdynamics.com

              1 Reply Last reply
              0
              • S Offline
                S Offline
                Satmosc
                wrote on 9 Mar 2011, 14:31 last edited by
                #7

                Yes for

                M.Hatami
                To the Rationalism

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  tobias.hunger
                  wrote on 9 Mar 2011, 14:58 last edited by
                  #8

                  Satmosc: Hmmm... is your box really, really slow or are you including lots and lots of code? Qt Creators code completion is actually rather fast.

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    Satmosc
                    wrote on 9 Mar 2011, 15:17 last edited by
                    #9

                    my project include a lot of code but not now , it is currently under Visual Studio. but even the a complex project under VS is still more faster than QT now !!!
                    did I missed something ?
                    I just downloaded QT SDK and Installed it !!!! , it was around 1.6GB .... did I missed something else to boost or include other libraries or soft ?

                    M.Hatami
                    To the Rationalism

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      Satmosc
                      wrote on 9 Mar 2011, 21:03 last edited by
                      #10

                      First Issue....
                      In Following Gradient ...
                      @Gradient {
                      GradientStop { position: 0 ; color: '#e0e1e8' }
                      GradientStop { position: 0.5; color: '#E0E1E8' }
                      GradientStop { position: 0.9; color: '#d8dae1' }
                      }@

                      I want to make it a global variable in .js code...
                      how can I do it ?
                      I did this
                      @var StyleWindowTitlebarActiveColor = "Gradient { GradientStop { position: 0 ; color: '#e0e1e8' } GradientStop { position: 0.5; color: '#E0E1E8' } GradientStop { position: 0.9; color: '#d8dae1' } }"@

                      but I found that when I want to assign it to a Rectange like
                      gradient : jscode.gradientvar

                      the Compiler (at QtCreator) returned an error that I cannot convert QStrint to QDecalarativeGradient ?

                      So , How you do it ? please , this is important ?
                      in WPF I make a Static Resource for example in App.xaml and as the App.xaml file is the highest level of the search (lower than dictionary) , it will find it. and also it has a type but in Java , I cannot define a Gradient Type of QML !!!!
                      Wpf Example :
                      @ <LinearGradientBrush x:Key="BorderTitleBarIsinActive" EndPoint="0.5,1" StartPoint="0.5,0">
                      <GradientStopCollection>
                      <GradientStop Color="#FFEEF0F2" Offset="0"/>
                      <GradientStop Color="#FFD8DAE1" Offset="0.9"/>
                      <GradientStop Color="#FFE0E1E8" Offset="0.5"/>
                      </GradientStopCollection>
                      </LinearGradientBrush>
                      @

                      M.Hatami
                      To the Rationalism

                      1 Reply Last reply
                      0
                      • K Offline
                        K Offline
                        kkrzewniak
                        wrote on 9 Mar 2011, 23:36 last edited by
                        #11

                        QtCreators code completion is lightning fast for me and I have used it across a variety of systems. It always performed as fast a VS code completion did.
                        And it Qt not QT :P

                        Me, Grimlock, not "nice dino". ME BASH BRAINS!

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          Satmosc
                          wrote on 10 Mar 2011, 09:16 last edited by
                          #12

                          even this code as a local variable is not working !!!!
                          @ property gradient StyleWindowTitlebarInactiveColor : {
                          GradientStop { position: 0 ; color: '#e0e1e8' }
                          GradientStop { position: 0.5; color: '#E0E1E8' }
                          GradientStop { position: 0.9; color: '#d8dae1' }
                          }@

                          M.Hatami
                          To the Rationalism

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            Satmosc
                            wrote on 10 Mar 2011, 14:40 last edited by
                            #13

                            [quote author="Alicemirror" date="1299680012"]I subscribe what has wrote Tobias.

                            Consider that I tell this as an experienced developer by 40 years (!!!) and in '80-'90 I had been a MS developer, then I worked on some many platforms and environments that I don't remember all. Sure QT is the best choice against VS.
                            Do you have taken in consideration the idea to publish your projects on the nokia forum community, so you can share work and knowledge with a lot of people? If you do this, and notify me, I can participate (at least as a follower) to this.
                            I think that best of a lot of books can be the shared experience and knowledge between people, the forums and the on-line and off-line documentation about QT, QML and more.[/quote]

                            I just started the project from the state 0.... with new look at the QT
                            it is in my upload area at "Satmosc QT Test Upload for Gix ":http://209.190.27.10/index.php?nav=display&file=1

                            If you take a look , I made a rectangle that has a Gradient color scheme.
                            I used runtime.isActiveWindow to determine if the window has active focus or not.
                            my problem is I cannot make a Global Variable for the Gradient Style using JavaScript.
                            in JavaScript all imported datas are QString format and I am unable to convert or cast (BOX/Unbox) it to QDecalarativeGradient format. !!!!
                            Do you (or anybody) know any method ?

                            Thanks

                            M.Hatami
                            To the Rationalism

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              Satmosc
                              wrote on 10 Mar 2011, 14:43 last edited by
                              #14

                              I forgot ,,,, also , QtDesigner (inside QtCreator) is unable to show a correct view of the test project.
                              I know it has runtime conditions , but it is right to decide between false or true to show one of the colors of the conditions at least.

                              M.Hatami
                              To the Rationalism

                              1 Reply Last reply
                              0
                              • A Offline
                                A Offline
                                Alicemirror
                                wrote on 10 Mar 2011, 14:51 last edited by
                                #15

                                Satmosc,

                                What can I give you and advice? Please, set the code under version control (git preferable) and setup the project, informations, ideas etc and repository under forum.nokia.com / community / your projects.
                                Thus, we can not only share but also interact, exchange ideas, I can clone locally your project and see what's strange or wrong etc.
                                Using this method, complete and useful, we save a lot of time.

                                Tanks.

                                Enrico Miglino (aka Alicemirror)
                                Balearic Dynamics
                                Islas Baleares, Ibiza (Spain)
                                www.balearicdynamics.com

                                1 Reply Last reply
                                0
                                • S Offline
                                  S Offline
                                  Satmosc
                                  wrote on 10 Mar 2011, 15:15 last edited by
                                  #16

                                  Thanks you very much... yes I will do it. Actually the reason I did it is that it is just a few line of code and nothing so serious.
                                  Something that I am looking to find is Static Resources or Qt model called Global Variables.
                                  How Can I define a Gradient ( including its stops) as a global Variables !!?
                                  thanks .

                                  M.Hatami
                                  To the Rationalism

                                  1 Reply Last reply
                                  0
                                  • A Offline
                                    A Offline
                                    Alicemirror
                                    wrote on 10 Mar 2011, 15:22 last edited by
                                    #17

                                    I think that a way is to define a property, then set the gradient with the property value. See the gradient doc on how to set values.

                                    Properties can be part of the object definition, then you set them externally when the object is used and instantiated by the program

                                    Enrico Miglino (aka Alicemirror)
                                    Balearic Dynamics
                                    Islas Baleares, Ibiza (Spain)
                                    www.balearicdynamics.com

                                    1 Reply Last reply
                                    0
                                    • S Offline
                                      S Offline
                                      Satmosc
                                      wrote on 10 Mar 2011, 15:29 last edited by
                                      #18

                                      Thank you very much.... I already defined it as a property but I am a bit lazy and I was unable to access it from an other File.
                                      I made an other QML file and inside that QML File I did :
                                      GlobalVariables.qml
                                      ///
                                      @import Qt 4.7

                                      Item {
                                      property Gradient titleBar_grdnt1: Gradient {
                                      GradientStop {
                                      position: 0
                                      color: '#e0e1e8' }
                                      GradientStop {
                                      position: 0.5
                                      color: '#E0E1E8' }
                                      GradientStop {
                                      position: 0.9
                                      color: '#d8dae1' }
                                      }
                                      }
                                      @

                                      and inside main .QML file I used import "qmldir" (the directory containing that file)
                                      then I tried to access that property from the main file but
                                      using GlobalVariables.titleBar_grdnt1 the compiler says it cannot find GlobalVariables !!!! even the file is visible !!!
                                      So , I think as a beginner I am doing it in a wrong way ....
                                      What should I use inside the GlobalVariables.QML file ,,, Item or .... ?
                                      How to instantiate the GlobalVariables ? like C++ ?? using new ? but it failed !!!!:(

                                      I am searching the Forum and Documents , that is too hard to find the answer....
                                      Qml really seek a better documantation....
                                      thanks again for your answer sir.

                                      M.Hatami
                                      To the Rationalism

                                      1 Reply Last reply
                                      0
                                      • A Offline
                                        A Offline
                                        Alicemirror
                                        wrote on 10 Mar 2011, 15:43 last edited by
                                        #19

                                        You should

                                        Please take a look to the code of the project I am working on at https://projects.forum.nokia.com/rchobbystream

                                        In main you should import the files in the format

                                        @import "elements_dir" 1.0 as Name@

                                        Where Name should be a name starting with the Caps. elements_dir should contain a separate qml file for every item you create, with the initial Caps.

                                        Your iten in the qml file should have an id: to reference the object from the parent and inside the object components (the qml file).

                                        Then, in the main.qml file, you can instantiate the object using

                                        @Name.Object {
                                        id: myid
                                        }
                                        @
                                        So, the child properties can be used in the main.qml file.

                                        Enrico Miglino (aka Alicemirror)
                                        Balearic Dynamics
                                        Islas Baleares, Ibiza (Spain)
                                        www.balearicdynamics.com

                                        1 Reply Last reply
                                        0
                                        • S Offline
                                          S Offline
                                          Satmosc
                                          wrote on 10 Mar 2011, 15:57 last edited by
                                          #20

                                          oh my god... you rock.... this is exactly what I was looking for and it made me happy that it is possible to have a resource in QML ....
                                          Thank you 1000 times.... still 2 Questions :

                                          1. Where did you learn it ? ( i want to know where to study and follow QML and its future features.)

                                          2. how can we explain it ! ? Static Resource or dynamic !? I mean the resource could be changed during runtime ? also , they will be used as a static variable in memory or they will be just assigned as soon as we use them ?

                                          3. in the code 1
                                            import "elements_dir" 1.0 as Name
                                            What is the meaning of 1.0 ? !! version ?

                                          by the way thank you again

                                          M.Hatami
                                          To the Rationalism

                                          1 Reply Last reply
                                          0

                                          1/25

                                          9 Mar 2011, 11:29

                                          • Login

                                          • Login or register to search.
                                          1 out of 25
                                          • First post
                                            1/25
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved