Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Behind the Scenes
  3. Wiki Discussion
  4. Qt Quick best practices wiki page
QtWS25 Last Chance

Qt Quick best practices wiki page

Scheduled Pinned Locked Moved Wiki Discussion
19 Posts 2 Posters 9.3k 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.
  • W Offline
    W Offline
    Wolf P.
    wrote on last edited by
    #2

    Looks good :-)
    Maybe mandatory rules like "uniqueness of the id property":http://doc.qt.nokia.com/4.7/qdeclarativeintroduction.html#the-property could be separated. Are there already conventions about indentation and commenting style? Loking on the link above 4 spaces plus line end comments seems to be preferred.

    BTW: is there a way to subscribe to wiki changes?

    1 Reply Last reply
    0
    • ? This user is from outside of this forum
      ? This user is from outside of this forum
      Guest
      wrote on last edited by
      #3

      good suggestions @Wolf P. will update

      there is a "Recent Changes" link in the Wiki Menu on the Wiki main page. You could subscribe to that RSS feed, but I think that pushes only newly added pages and not on every edit.

      1 Reply Last reply
      0
      • W Offline
        W Offline
        Wolf P.
        wrote on last edited by
        #4

        [quote author="chetankjain" date="1291107334"]You could subscribe to that RSS feed, but I think that pushes only newly added pages and not on every edit.[/quote]

        Oh thanks! I looked rather for a notification mail service as provided for the forum.

        1 Reply Last reply
        0
        • ? This user is from outside of this forum
          ? This user is from outside of this forum
          Guest
          wrote on last edited by
          #5

          for mail notification for wiki page entries, you could raise a request for that new feature to be implemented, in the beta forum of devnet

          1 Reply Last reply
          0
          • ? This user is from outside of this forum
            ? This user is from outside of this forum
            Guest
            wrote on last edited by
            #6

            just updated the wiki page with more contents

            1 Reply Last reply
            0
            • W Offline
              W Offline
              Wolf P.
              wrote on last edited by
              #7

              Fine. Is the top-level order intended?

              I would disagree with your examples of comments. Let me try some editing there...

              1 Reply Last reply
              0
              • ? This user is from outside of this forum
                ? This user is from outside of this forum
                Guest
                wrote on last edited by
                #8

                [quote author="Wolf P." date="1291117880"]Fine. Is the top-level order intended?

                I would disagree with your examples of comments. Let me try some editing there...[/quote]

                yes pls go ahead :) the aim is to collate all the best practices and I am still learning too :D

                1 Reply Last reply
                0
                • W Offline
                  W Offline
                  Wolf P.
                  wrote on last edited by
                  #9

                  ...ready.

                  Sorry, I found the block end comments questionable.

                  1 Reply Last reply
                  0
                  • ? This user is from outside of this forum
                    ? This user is from outside of this forum
                    Guest
                    wrote on last edited by
                    #10

                    The example looks ok.

                    I moved the 2 bullets talking about comments to the "Open for discussion" section... lets see what everyone has to say. Maybe we could have a poll later on these topics. Else the trolls could also have a final word :)

                    1 Reply Last reply
                    0
                    • X Offline
                      X Offline
                      xsacha
                      wrote on last edited by
                      #11

                      How about some DOs / DONTs for cross-platform QtQuick?

                      What about using fixed size width, height, x, y vs anchors/locations. Fixed sizes seem overused, even in the examples.

                      Also, if you don't specify a font size, it could be anything it seems. Even if it looks fine on one platform, it be quite different on another unless you specify. Important to consider.

                      • Sacha
                      1 Reply Last reply
                      0
                      • W Offline
                        W Offline
                        Wolf P.
                        wrote on last edited by
                        #12

                        DONTs are a good idea i find. What about starting an own wiki page for it? I'll help as I can.
                        I suggested the title "Qt Quick Donts":http://developer.qt.nokia.com/wiki/Qt_Quick_Donts on the best practices page.

                        Happy wikiing :)

                        1 Reply Last reply
                        0
                        • X Offline
                          X Offline
                          xsacha
                          wrote on last edited by
                          #13

                          So should the cross-platform (i.e. cross-resolution) DONTs go in there? You should always try to make your code cross-platform I think. Especially important to learn from the start. However, I'm not so sure on how important it is to make the QML rotatable.

                          It's quite amazing when you do the right practices and your code works on devices you've never even seen before.
                          There was a nice app on Qt-Apps made in QML for Linux Desktop. Worked perfect on Symbian devices even though the developer had never used or seen one.

                          • Sacha
                          1 Reply Last reply
                          0
                          • W Offline
                            W Offline
                            Wolf P.
                            wrote on last edited by
                            #14

                            [quote author="xsacha" date="1291282464"]So should the cross-platform (i.e. cross-resolution) DONTs go in there? You should always try to make your code cross-platform I think. Especially important to learn from the start. However, I'm not so sure on how important it is to make the QML rotatable.[/quote]

                            If it is actually possible to write platform dependend QML, then I think that it should be included (sorry I'm not an experienced QML developer, I tried hacking some examples up to now)

                            I find the idea of the reverse style so appealing. :)

                            1 Reply Last reply
                            0
                            • X Offline
                              X Offline
                              xsacha
                              wrote on last edited by
                              #15

                              I have often seen in code (for example the Twitter app in SDK), they use specific font sizes and widths.
                              I ran it on Windows, looks fine. Though, the app is clearly designed for a mobile device with its small space constraints. So I tried it on Symbian, hideous. I spent a day fixing it up and it looks great now.

                              It's funny because they admit this in the code. I saw a comment that they should use anchors instead. Definitely wiki material.

                              • Sacha
                              1 Reply Last reply
                              0
                              • W Offline
                                W Offline
                                Wolf P.
                                wrote on last edited by
                                #16

                                I'd highly appreciate if you would start the wiki page.

                                1 Reply Last reply
                                0
                                • X Offline
                                  X Offline
                                  xsacha
                                  wrote on last edited by
                                  #17

                                  [quote author="Wolf P." date="1291293375"]I'd highly appreciate if you would start the wiki page.[/quote]
                                  Alright, I started that page. I mentioned the fixed size vs anchors point.

                                  • Sacha
                                  1 Reply Last reply
                                  0
                                  • W Offline
                                    W Offline
                                    Wolf P.
                                    wrote on last edited by
                                    #18

                                    :) Great! (I immediately made some minor changes.)

                                    1 Reply Last reply
                                    0
                                    • ? This user is from outside of this forum
                                      ? This user is from outside of this forum
                                      Guest
                                      wrote on last edited by
                                      #19

                                      this has since been added as a "suggestion":http://bugreports.qt.nokia.com/browse/QTBUG-15757 in the Qt bug tracker and seems to be accepted, so we might see an official version soon ...

                                      have also added a few more points in the wiki page ..

                                      ps. a tag is missing for this post ? ;-)

                                      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