Results 1 to 4 of 4

Thread: Newbie question regarding Py Qt4 Designer

  1. #1
    Join Date
    Jan 2017
    Posts
    54
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Newbie question regarding Py Qt4 Designer

    As a newbie (this is my first post here), I am six months into Python and about a month into Qt4 Designer (I know Excel userforms, which seems to be close to the Qt Designer). Here are my questions:

    1. Regarding "layouts - horizontal, vertical, etc" -- is the only benefit to using one of the layouts is that the form/GUI will resize proportionately? If I design one that fits on a laptop and/or desktop, does it matter if the user can resize the form? Is there a trick to picking a layout for a non-linear form -- like one that has 9 frames of different sizes -- I have tried hundreds of times, but the frames (and labels, etc) keep jumping all over the page once I hit one of the layouts. I have read the literature, but just cannot seem to get it.

    2. When I completed my GUI (without a layout), I clicked to view the code, and received this error message "Unable to launch C:Python34/lib/site-packages/PyQt4\uic". I have Python 3.6 installed, but I do not know what this message means.

    3. I use PyCharm as my IDE and have written a program in it. Once I figure out question #2, how do I get the GUI code into my PyCharm file, or how do I get my PyCharm file into the GUI? Or is there another way to link them together?

    Thanks for responding

  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: Newbie question regarding Py Qt4 Designer

    Quote Originally Posted by dennisvz View Post
    1. Regarding "layouts - horizontal, vertical, etc" -- is the only benefit to using one of the layouts is that the form/GUI will resize proportionately?
    The main benefits of layout is that you get stable arrangements.
    Space requirements of UI elements can change, e.g. due to different font or font sizes, language, etc.

    Layouts make sure that elements are resized and repositioned as needed.

    Quote Originally Posted by dennisvz View Post
    If I design one that fits on a laptop and/or desktop, does it matter if the user can resize the form? Is there a trick to picking a layout for a non-linear form -- like one that has 9 frames of different sizes -- I have tried hundreds of times, but the frames (and labels, etc) keep jumping all over the page once I hit one of the layouts. I have read the literature, but just cannot seem to get it.
    The usual workflow is to layout items together that belong together, by selecting them and then selecting the approriate layout.
    A container widget's main layout is then often just a vertical or horizontal arrangement of these sub layouts.

    Quote Originally Posted by dennisvz View Post
    2. When I completed my GUI (without a layout), I clicked to view the code, and received this error message "Unable to launch C:Python34/lib/site-packages/PyQt4\uic". I have Python 3.6 installed, but I do not know what this message means.
    The UIC is a tool from Qt in your case PyQt. I generates code from the XML document that QtDesigner saves to.
    Check the path, see if the executable is there.

    Quote Originally Posted by dennisvz View Post
    3. I use PyCharm as my IDE and have written a program in it. Once I figure out question #2, how do I get the GUI code into my PyCharm file, or how do I get my PyCharm file into the GUI? Or is there another way to link them together?
    There are different approaches.
    Usually the class generated by uic is imported and then used inside a user defined class, but is is also possible to derive from the generated class.

    Cheers,
    _

  3. #3
    Join Date
    Jan 2017
    Posts
    54
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Newbie question regarding Py Qt4 Designer

    Regarding the answer to my #2 question, how do I check the path? What should it be? I am a beginner and do not know how to do the path thing.

  4. #4
    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: Newbie question regarding Py Qt4 Designer

    Quote Originally Posted by dennisvz View Post
    Regarding the answer to my #2 question, how do I check the path? What should it be? I am a beginner and do not know how to do the path thing.
    For a programmer it is essential to know the basics of how operating systems work, specially the one the programmer works with.

    https://en.wikipedia.org/wiki/Path_(computing)

    The error you got and which you posted in the first comment of this thread complains that a program at a certain path can't be launched.
    The first thing to do is therefore to check if that program is actually at that path.

    Cheers,
    _

Similar Threads

  1. Newbie Question with Qextserialport.tar.gz
    By nomad in forum Qt-based Software
    Replies: 2
    Last Post: 13th July 2009, 14:32
  2. Newbie Designer question
    By JariV in forum Qt Tools
    Replies: 0
    Last Post: 15th February 2009, 23:24
  3. Newbie threading question
    By deepayan in forum Qt Programming
    Replies: 17
    Last Post: 16th April 2007, 01:25
  4. Newbie needs advice on moving to designer
    By nbkhwjm in forum Newbie
    Replies: 2
    Last Post: 12th April 2007, 00:32
  5. Tipical newbie question
    By Dark_Tower in forum Newbie
    Replies: 2
    Last Post: 24th March 2006, 07:24

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.