Results 1 to 7 of 7

Thread: Begginers question

  1. #1
    Join Date
    Nov 2015
    Location
    UK
    Posts
    8
    Qt products
    Platforms
    Windows

    Default Begginers question

    Hi Guys,

    I recently started playing with QtDesigner (its fascinating) but why is it that when I preview my creation its got a totaly different theme ?
    theme.jpg

    Cheers
    Steve

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Begginers question

    You can preview in any of the available styles.
    I think by default it is using the style for the platform.

    Cheers,
    _

  3. #3
    Join Date
    Apr 2013
    Location
    Prague
    Posts
    258
    Thanks
    3
    Thanked 65 Times in 59 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Begginners question

    You can even select the style for the UI. Therefore
    (1) When building the UI in the Designer, the Designer uses a "Designer style" with all tools needed for building.
    (2) When previewing the UI in the Designer, the Designer uses a "real style" selected by you (or a default on the given platform). In fact, the result you see is a "real" window or dialog which you will see when you use the UI in your code.

  4. #4
    Join Date
    Nov 2015
    Location
    UK
    Posts
    8
    Qt products
    Platforms
    Windows

    Default Re: Begginers question

    OK... cool... so is it possible for me to get a nice looking window with rounded edges and the light blue shading on the top like the one I thought I was designing ? or am I stuck with the Eastern Block Prison style one that I get in the preview.

    It seems odd to me that the designer should purposely display a misrepresentation of what you are designing unless you go to preview.. isnt that a little odd ?
    Isnt that a little like putting your make=up on.. and then looking in the mirror to see if its a mess or not ?

  5. #5
    Join Date
    Apr 2013
    Location
    Prague
    Posts
    258
    Thanks
    3
    Thanked 65 Times in 59 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Begginers question

    As far as the color is concerned, yes, using a style sheet. As to the corners, I am not sure in the Designer - but, AFAIK, you can do it in your code.

    The Designer does not display misrepresentation. Note that the Designer needs to support moving widgets, sizing them, organizing them in layouts, copying them, making space around them and so on. It needs some well defined "style" for it, so it uses one. The preview is really a window displayed in a certain style but the preview cannot be updated (except sizing the whole UI - like a window displayed by your app).

  6. #6
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Begginers question

    The "work area" window in designer is just a work area.

    The preview depends on the style plugin being used, which is also what the application can use.

    The two windows looks quite alike actually, the designer content shows some artifacts related to layouting though.

    Since you mentioned "light blue shading on the top" that is the window decoration, so the previiew uses the one that the system provides.

    The simulated one of the work area looks like it how the decoration would look like on a Windows 7 system I think.
    The real one is the one of the preview window (and the one of the QtCreator window).

    Cheers,
    _

  7. #7
    Join Date
    Nov 2015
    Location
    UK
    Posts
    8
    Qt products
    Platforms
    Windows

    Default Re: Begginers question

    Ok thanks guys ... it just behaves differently to the way I expected... I did try to change the look of my window but the image stopped showing up... I then added a resource file and things looked ok.... but after changing to add more images to the file they stopped appearing on the preview (icon and background) they also no longer show in the resource selector even if I load a different file al together.... so I think I broke something Ill go scratch my head a little

Similar Threads

  1. Question about Qt+VTK...
    By Patrick Sorcery in forum Qt Programming
    Replies: 0
    Last Post: 11th October 2010, 11:20
  2. css question
    By Hardstyle in forum Newbie
    Replies: 1
    Last Post: 29th June 2010, 05:29
  3. begginers question
    By hollowhead in forum Newbie
    Replies: 23
    Last Post: 5th March 2010, 17:15
  4. GUi or Not GUI - that is the question
    By bruccutler in forum Qt Programming
    Replies: 1
    Last Post: 23rd February 2007, 18:19

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.