Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

UI to PY but not window when run in python



  • Hi, total newbie here. I have just installed the designer and created a very simple window to test it all worked, just a button sitting in the middle. If I load the ui file and convert in python it works just fine (code below)

    import sys
    from PyQt5 import QtWidgets, uic
    app = QtWidgets.QApplication(sys.argv)
    window = uic.loadUi("practice.ui")
    window.show()
    app.exec()
    

    However, if I load the py file nothing happens when I run the file, I am guessing that the program is waiting for me to open the window, am I missing an obvious piece of code.

    24d327c8-8169-4791-a797-c6c83f698968-image.png

    # -*- coding: utf-8 -*-
    
    # Form implementation generated from reading ui file 'practice.ui'
    #
    # Created by: PyQt5 UI code generator 5.9.2
    #
    # WARNING! All changes made in this file will be lost!
    
    from PyQt5 import QtCore, QtGui, QtWidgets
    
    class Ui_Frame(object):
        def setupUi(self, Frame):
            Frame.setObjectName("Frame")
            Frame.resize(319, 395)
            self.verticalLayoutWidget = QtWidgets.QWidget(Frame)
            self.verticalLayoutWidget.setGeometry(QtCore.QRect(100, 0, 121, 461))
            self.verticalLayoutWidget.setObjectName("verticalLayoutWidget")
            self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget)
            self.verticalLayout.setContentsMargins(0, 0, 0, 0)
            self.verticalLayout.setObjectName("verticalLayout")
            self.pushButton = QtWidgets.QPushButton(self.verticalLayoutWidget)
            self.pushButton.setObjectName("pushButton")
            self.verticalLayout.addWidget(self.pushButton)
    
            self.retranslateUi(Frame)
            QtCore.QMetaObject.connectSlotsByName(Frame)
    
        def retranslateUi(self, Frame):
            _translate = QtCore.QCoreApplication.translate
            Frame.setWindowTitle(_translate("Frame", "Frame"))
            self.pushButton.setText(_translate("Frame", "PushButton"))
    

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Since you are posting the generated code. Do you want to use that one ?

    If so, an example is shown here.


  • Banned

    Okay here is a simple MUC (Minimal Usable Code) example that shows you how to create a QMainWindow and its supporting objects all done in proper Python-Qt (aka no Designer untouchable black-box code which is always a bad idea) I hope this helps you if you need more extensive help just ask here or shoot me a PM

    # All imports should be done at the top for ease of viewing and collectivity
    # Just import the bare minimum of what you need and no more as this helps you
    # and anyone viewing your code to know what you are using and where it came
    # from at an easy glance.
    from PyQt5.QtCore    import Qt
    from PyQt5.QtGui     import QPalette, QColor, QBrush, QFont
    from PyQt5.QtWidgets import QApplication, QMainWindow, QWidget, QVBoxLayout
    from PyQt5.QtWidgets import QHBoxLayout, QDockWidget, QAction, QStyleFactory
    from PyQt5.QtWidgets import QLabel, QPushButton
    
    # Always import everything else after you import your Python-Qt objects as
    # this prevents potential issues that might occur if you do not
    from sys import exit as sysExit
    
    # This is your Menu and Tool Bar class it does not handle the Tool Bar
    # at this time but it could be expanded to do so fairly easily just 
    # keep in mind everything on a Tool Bar comes from the Menu    
    class MenuToolBar(QDockWidget):
        def __init__(self, MainWin):
          # Note do not use super( ) in Python as it introduces 4 known issues that 
          # must be handled properly. Further there are still actual bugs within
          # the usage of super( ) when used in Python. Now while super( ) does work 
          # fine within C++ it does not work as seamlessly within Python due to the 
          # major differences between these 2 languages. Next the reason it was 
          # created was to handle a rather rare inheritance issue and unless you are 
          # doing some complicated inheritance you will most likely never run into 
          # this extremely rare issue, however the 4 major issues that get included 
          # by using super( ) are much more likely to occur than that rare issue its 
          # meant for to solve. Of course using the basic explicit method (as shown), 
          # does not cause these issues and is as just as simple as using `super( )` 
          # further you do not actually gain anything useful by using `super( )` in 
          # Python that could not be done in a much simpler and safer manner.
            QDockWidget.__init__(self)
            self.MainWin = MainWin
            self.MainMenu = MainWin.menuBar()
    
          # This is used to have a handle to the Menu Items
          # should you implement a Tool Bar
            self.MenuActRef = {'HelloAct':0,
                               'ResetAct':0}
    
            # ******* Create the World Menu *******
            self.WorldMenu  = self.MainMenu.addMenu('World')
    
            # ******* Create World Menu Items *******
            self.HelloAct = QAction('&Hello', self)
          # In case you have or want to include an Icon
          #  self.HelloAct = QAction(QIcon('Images/hello.ico'), '&Hello', self)
            self.HelloAct.setShortcut("Ctrl+H")
            self.HelloAct.setStatusTip('Say Hello to the World')
            self.HelloAct.triggered.connect(self.SayHello)
            self.MenuActRef['HelloAct'] = self.HelloAct
    
            self.ResetAct = QAction('&Reset', self)
          #  self.ResetAct = QAction(QIcon('Images/reset.ico'), '&Hello', self)
            self.ResetAct.setShortcut("Ctrl+H")
            self.ResetAct.setStatusTip('Reset the Dialog')
            self.ResetAct.triggered.connect(self.ResetWorld)
            self.MenuActRef['ResetAct'] = self.ResetAct
    
            # ******* Setup the World Menu *******
            self.WorldMenu.addAction(self.HelloAct)
            self.WorldMenu.addSeparator()
            self.WorldMenu.addAction(self.ResetAct)
    
      # These are the Menu/Tool Bar Actions
        def SayHello(self):
            self.MainWin.MenuSubmit()
    
        def ResetWorld(self):
            self.MainWin.MenuReset()
    
    # The Central Panel where everything gets displayed basically the actual Main Gui
    class CenterPanel(QWidget):
        def __init__(self, parent):
            QWidget.__init__(self)
          # Note you only need handles "self." to things you plan to manipulate
    
          # Okay first everything for the Label 
          # Define the Palette and Brush for the Label
            lblPalette = QPalette()
            lblBrush = QBrush(QColor(255, 255, 255))
            lblBrush.setStyle(Qt.SolidPattern)
            lblPalette.setBrush(QPalette.Disabled, QPalette.Window, lblBrush)
          # Define the Font for the Label
            lblFont = QFont()
            lblFont.setPointSize(36)  # 48 was a bit big
          # Create and Set the Label
            self.lblDisplyr = QLabel()
            self.lblDisplyr.setPalette(lblPalette)
            self.lblDisplyr.setFont(lblFont)
            self.lblDisplyr.setAutoFillBackground(True)
            self.lblDisplyr.setText("Here is What I Look Like Before the Click")
    
          # Now everything for the Button
            self.btnSubmit = QPushButton('Submit')
            self.btnSubmit.clicked.connect(self.HandleSubmit)
    
          # Put the Button in a Box on the Left to handle its layout
            HBox = QHBoxLayout()
            HBox.addWidget(self.btnSubmit)
            HBox.addStretch(1)
    
          # Finally put everything in a Vertical Box to finish the layout
            VBox = QVBoxLayout()
            VBox.addLayout(HBox)
            VBox.addWidget(self.lblDisplyr)
            VBox.addStretch(1)
    
          # Assign the Layout to your Center Pane QWidget            
            self.setLayout(VBox)
    
        def HandleSubmit(self):
            self.lblDisplyr.setText('Hello World... can you read me yet?')
    
    class MainWindow(QMainWindow):
        def __init__(self):
            QMainWindow.__init__(self)
          # Basic Main Window Items aka this is your Handler or Controller for M-V-C
            self.setWindowTitle('Main Window')
          # I do this for clarity and to remind myself which occupies what spot
            WinLeft = 150; WinTop = 150; WinWidth = 500; WinHigh = 500
            self.setGeometry(WinLeft, WinTop, WinWidth, WinHigh)
    
          # QMainWindow contains a Central Widget, Menu/Tool Bar, Status Bar, and 
          # dockable window border this covers 3 of the 4 items
            self.CenterPane = CenterPanel(self)
            self.setCentralWidget(self.CenterPane)
    
          # The Menu and Tool Bar for your MainWindow should you want one or both
            self.MenuBar = MenuToolBar(self)
    
          # The Status Bar for your MainWindow should you want one
            self.SetStatusBar(self)
          # Not exactly sure what this does but it does remove oddities from the window
            self.setStyle(QStyleFactory.create('Cleanlooks'))
    
        def SetStatusBar(self, parent):
            StatusMsg = ''
            parent.StatBar = parent.statusBar()
    
            if len(StatusMsg) < 1:
              # This verbiage will disappear when you view menu items
                StatusMsg = 'Ready'
    
            parent.StatBar.showMessage(StatusMsg)
    
        def MenuSubmit(self):
            self.CenterPane.HandleSubmit()
    
        def MenuReset(self):
            self.CenterPane.lblDisplyr.setText('Oh no the World has been Reset')
    
    if __name__ == "__main__":
        MainEvntThred = QApplication([])
    
        MainApp = MainWindow()
        MainApp.show()
    
        MainEvntThred.exec()
    
      # If anyone wants more extensive free help I run an online lab-like classroom-like 
      # message server feel free and drop by you will not be able to post until I clear 
      # you as a student as this prevents spammers so if interested here is the invite
      # https://discord.gg/3D8huKC
    


  • @AndyPaul Use pyuic5 practice.ui -o practice.py -x


  • Banned

    @AndyPaul be forewarned that dealing with the UI is just going to be one headache after another and I speak to you from experience as I have taught numerous students who were struggling with one problem or another with getting their normal Python-Qt code to work with the UI. The were also quite surprised just how easy it was to create normal Python-Qt GUIs once they understood how. Further they found it was just as quick and quicker if you factor in all the time wasted on working with the UI after its made. So it is a lot better in the long run to learn Python-Qt GUI creation than it is to keep leaning on the horrible crutch that the Designer is as it only crippled you as a programmer and thus holds you back from gaining your true potentiality



  • @Denni-0 Thank you, I was beginning to think that the designer wasn't worth all the extra work it seemed to be creating, i thought I was doing something wrong.



  • @eyllanesc Thank you, adding the -x brought up the missing window :-)



  • @AndyPaul said in UI to PY but not window when run in python:

    adding the -x brought up the missing window :-)

    If your issue is solved, please don't forget to mark your post as such.


  • Moderators

    @AndyPaul Why would anything happen if you just load the file? It contains a class definition and nothing more. You have to create a widget, the form object (Ui_Frame) and call the Ui_Frame.setupUi on the widget to get something shown. (@SGaist's link provides an example)

    @Denni-0 said in UI to PY but not window when run in python:

    @AndyPaul be forewarned that dealing with the UI is just going to be one headache after another and I speak to you from experience as I have taught numerous students who were struggling with one problem or another with getting their normal Python-Qt code to work with the UI.

    And I've had a long, long time working with Qt, and have taught numerous students in C++, not to mention physics. So what you claim, even if we go on a limb and believe to be true, is completely irrelevant here. Be forewarned you're neither the only one around knowing stuff, nor are you the leanest and meanest; not to mention that your opinions are by far not the chisel to the stone.

    The were also quite surprised just how easy it was to create normal Python-Qt GUIs once they understood how.

    Really. Have you ever considered that the designer generates just normal code. Code generation tools are there for a reason - to spare people tedious mind-numbing repetitive tasks that machines do better and faster. I know, just perplexing, right? Can you believe such craziness?

    Further they found it was just as quick and quicker if you factor in all the time wasted on working with the UI after its made.

    Sure, if you don't know what the heck you're doing; it'd have been your job to teach them if I understand it correctly. Not having the faintest clue of how an engine works is faulty reasoning to reinvent the Otto cycle.

    So it is a lot better in the long run to learn Python-Qt GUI creation than it is to keep leaning on the horrible crutch that the Designer is as it only crippled you as a programmer and thus holds you back from gaining your true potentiality

    Programming can't be reduced to putting a couple of controls to a user interface and being an obnoxious self-righteous punk ain't helping nobody reach any potential they may've had. So drop the platitudes, will ya? Just stick to the problem at hand.


  • Moderators

    @Denni-0 said in UI to PY but not window when run in python:

    @AndyPaul be forewarned that dealing with the UI is just going to be one headache after another and I speak to you from experience as I have taught numerous students who were struggling with one problem or another with getting their normal Python-Qt code to work with the UI.

    If there is a problem with the code generated from pyuic5 then please report this at https://bugreports.qt.io as bug reports are welcome and if something can be improved its best to report this accordingly. If you are just saying that it is easier to write a UI directly instead of using pyuic with a ui file, this may be true for some people. But it is available there as a tool for people to use, they may find it better for their needs to generate it using pyuic5 to save time or because they have no problem with using it.

    So if there is an actual problem, report it, otherwise there is no reason to be critical of someone's choice. If a problem arises from actually using the tool, then of course it is fine to suggest doing it directly instead of using the tool to solve the problem.


  • Banned

    @kshegunov said in UI to PY but not window when run in python:

    @AndyPaul Why would anything happen if you just load the file? It contains a class definition and nothing more. You have to create a widget, the form object (Ui_Frame) and call the Ui_Frame.setupUi on the widget to get something shown. (@SGaist's link provides an example)

    Well even after doing all this unnecessary stuff to make a UI work that is not needed when using Python-Qt the way it was meant to be used -- the UI still has functional issues AND most importantly it is untouchable black-box code which any experienced programmer worth their salt knows that introducing these kind of things (untouchable black-box code) into a program is always dangerous and needs to be avoided unless absolutely necessary and even then these untouchable black-box APIs are almost always a headache. Not always mind you but enough to have given using them a very bad reputation in the industry


    And I've had a long, long time working with Qt, and have taught numerous students in C++, not to mention physics. So what you claim, even if we go on a limb and believe to be true, is completely irrelevant here. Be forewarned you're neither the only one around knowing stuff, nor are you the leanest and meanest; not to mention that your opinions are by far not the chisel to the stone.

    And what does C++ have to do with Python they are 2 dynamically different languages sure both are based on C but that does not mean a lot. That being said I have numerous years of experience using/teaching C, C++, C#, VB.Net, and the list goes on. So yeah I know what I am talking about and when I do not know I either find out the facts or I simply state I do not know -- I am not omnipotent nor do I pretend to be so -- further I teach all my students to think for themselves and that goes for anything I share with them as I do not want them to be lemmings like many other programmers out there seem to be. Analyze it, know it and then make your own decision. As for others out there being knowledgeable sure and some of them are even students of mine and they teach me a thing or two from time to time. As a teacher I know that I am never going to be the source of all information nor do I want to be -- I am simply A source that encourages folks to do their own research your warning is totally meaningless and almost troll like in presentation (which I will be notifying moderators about).

    The were also quite surprised just how easy it was to create normal Python-Qt GUIs once they understood how.

    Really. Have you ever considered that the designer generates just normal code. Code generation tools are there for a reason - to spare people tedious mind-numbing repetitive tasks that machines do better and faster. I know, just perplexing, right? Can you believe such craziness?

    Yes I have and No it does not generate normal code in the sense of it being used within Python it generates XML Code which does not always play so nicely and it generates untouchable black-box code (per its own outline). Lastly the code it generates has a purpose and that is to allow your GUI to easily be transported to numerous language bases (aka Python, C++, perhaps C#, etc...) but unless you are using this feature that it was designed for the issues (cons) that come with its pros are not worth it thus the forewarning about using it

    Further they found it was just as quick and quicker if you factor in all the time wasted on working with the UI after its made.

    Sure, if you don't know what the heck you're doing; it'd have been your job to teach them if I understand it correctly. Not having the faintest clue of how an engine works is faulty reasoning to reinvent the Otto cycle.

    You know surprisingly most students be they veteran programmers or newbies all struggled with similar issues and frankly it was taking them longer to understand how to use the UIs than it took everyone of them to understand how to use Python-Qt as it was meant to be used. So your comment is groundless and factless as much of this post is. And you assume I do not know how the engine works -- but I do know how it works in concept and in results as I have gone through numerous UIs in order to help one student or another figure out what was wrong because they had not chosen to give up using it as of yet (not my choice to make for them). What I teach is using tools for what they were meant to be used for and that tool was not meant to generate Python-Qt code it was meant to generate XML Code and that is what it produces which subsequently can be a pain to use in conjunction with Python-Qt

    So it is a lot better in the long run to learn Python-Qt GUI creation than it is to keep leaning on the horrible crutch that the Designer is as it only crippled you as a programmer and thus holds you back from gaining your true potentiality

    Programming can't be reduced to putting a couple of controls to a user interface and being an obnoxious self-righteous punk ain't helping nobody reach any potential they may've had. So drop the platitudes, will ya? Just stick to the problem at hand.

    Again it is obvious to me that you were not addressing the problem at hand at all -- but some seem to be soap boxing an issue you have and this is what is called trolling but in case you do not understand here is the general definition of being a Troll along with some additional definitions in case you do not understand some of more key words being used

    A Troll is a person who distracts and/or sows discord or simply disrupts a discussion by posting inflammatory, digressive, extraneous, or off-topic messages in an online community with the intent of provoking readers into displaying emotional responses or causing the current discussion to become derailed, whether for the their mere amusement, for specific gain, just because they can, or because they just unwittingly wanted to. This often starts quarrels and/or upsets other people within the medium.
    
    Inflammatory: Intended to arouse angry or violent feelings
    
    Digressive: Departing from the subject matter being discussed
    
    Extraneous: Irrelevant or unrelated to the subject
    
    Off-Topic: Not relevant to the subject under discussion
    

  • Banned

    @AndyS said in UI to PY but not window when run in python:

    If there is a problem with the code generated from pyuic5 then please report this at https://bugreports.qt.io as bug reports are welcome and if something can be improved its best to report this accordingly. If you are just saying that it is easier to write a UI directly instead of using pyuic with a ui file, this may be true for some people. But it is available there as a tool for people to use, they may find it better for their needs to generate it using pyuic5 to save time or because they have no problem with using it.
    So if there is an actual problem, report it, otherwise there is no reason to be critical of someone's choice. If a problem arises from actually using the tool, then of course it is fine to suggest doing it directly instead of using the tool to solve the problem.

    Yes @AndyPaul there are issues with using the output from the Designer as first it is XML Code but if you mean the Py-UI created by the converter yes there are even more issues with that -- as that creates static non-python-qt code. I say non-python-qt in the sense that it does not use the dynamic layout functionality that Python-Qt is built upon and perhaps it cannot due to how the base XML code is created it is hard to say. Do you know who created the Converter and/or who created the Designer that produces the XML code? I can reach out to them and collaborate if they want I have helped on other open source projects in the past.

    Still this does not remove the fact that the end product is untouchable black-box code which is a concept that even if the output were turned into a more stand alone class with a quality API interface would not change. For the mere fact that it is untouchable black-box code makes it dangerous as you do not know how it works nor what it is doing. Now if it created more standard like Python-Qt code that one can then augment that would be a totally different story but I imagine that would require a major rewrite which I doubt is going to happen anytime soon.

    Lastly why is there a push to have folks coding in Python-Qt use a Tool designed to make untouchable black-box XML code when creating complicated windows (as I have done this) using standard Python-Qt is fairly simple and straight-forward and easily understood stood by every programmer I have taught how to use it which currently is well over 40 students of varying degrees of expertise. Sure not a huge pool to draw on but so far its as consistent as a world class swiss watch and that speaks for something.


  • Moderators

    @Denni-0 said in UI to PY but not window when run in python:

    Well even after doing all this unnecessary stuff to make a UI work that is not needed when using Python-Qt the way it was meant to be used -- the UI still has functional issues AND most importantly it is untouchable black-box code which any experienced programmer worth their salt knows that introducing these kind of things (untouchable black-box code) into a program is always dangerous and needs to be avoided unless absolutely necessary and even then these untouchable black-box APIs are almost always a headache. Not always mind you but enough to have given using them a very bad reputation in the industry

    None of this is even remotely close to true, nor is it any helpful, nor is your opinion worth any more than the next guy's. So I feel justified in classifying it in the "yet another useless platitude" folder. Thanks for playing!

    And what does C++ have to do with Python

    The same thing that your claim you've taught students has to do with the original question - absolutely nothing. That's why I inserted this illustration there, as yet another example of why what you write has practically no merit.

    That being said I have numerous years of experience using/teaching C, C++, C#, VB.Net, and the list goes on.

    Good for you. For me, *shrug*, I could care less, I only care about what you wrote, which has very little to do with the actual question. Which I'd be more than glad to remind you was:

    However, if I load the py file nothing happens when I run the file, I am guessing that the program is waiting for me to open the window, am I missing an obvious piece of code.

    So yeah I know what I am talking about and when I do not know I either find out the facts or I simply state I do not know -- I am not omnipotent nor do I pretend to be so

    ... except when you crusade to show that you are ...

    -- further I teach all my students to think for themselves and that goes for anything I share with them as I do not want them to be lemmings like many other programmers out there seem to be.

    Oh thanks, we lemmings, designer-lovers and akin really value your opinion on our miserable existence. Get a life, dude.

    Analyze it, know it and then make your own decision.

    I already have, I have used the designer for years. That's how I know what needs to be done to show the window when I don't know any python. Surprise, surprise, I do the same in C++.

    As for others out there being knowledgeable sure and some of them are even students of mine and they teach me a thing or two from time to time. As a teacher I know that I am never going to be the source of all information nor do I want to be -- I am simply A source that encourages folks to do their own research your warning is totally meaningless and almost troll like in presentation

    It wasn't a warning. I was paraphrasing your pretentious tone for sarcastic purposes.

    (which I will be notifying moderators about).

    Bite me. You know where you can find the admin, since he's already replied to this thread. If I warrant a ban for trolling, so be it, I take responsibility for what I say and do. I'm still going to say/do it, but I don't run from the consequences. As for how trolling it was, it seems to me that the local community disagrees with you. I've rarely seen people being downvoted, and even more so someone as downvoted as you. A piece of unsolicited advice: take note of that.

    Yes I have and No it does not generate normal code in the sense of it being used within Python it generates XML Code

    For which there's the user interface compiler to bring to python, just the same as for C++. And yes, I've used these two things interchangeably as this is the usual an recommended way the toolchain is used.

    So your comment is groundless and factless as much of this post is.

    Maybe, or just maybe that's how you choose to read it so it suits your crusade against the evil windmills.

    And you assume I do not know how the engine works

    You don't seem to be distinguishing between a statement of fact and a metaphor. I can't even be angry for this, just saddened.

    but I do know how it works in concept

    I also know how a nuclear power plant works in concept, I'm not going to be building one in my basement. "In concept" isn't knowing "in detail", sorry to break your bubble.

    What I teach is using tools for what they were meant to be used for and that tool was not meant to generate Python-Qt code

    I happen to know that this tool (along with its cousin the py uic) are there exactly for that reason.

    Again it is obvious to me that you were not addressing the problem at hand at all

    I actually had addressed the problem.

    but some seem to be soap boxing an issue you have

    An issue with you personally, no. As a matter of fact I suggested you don't get banned the first time around (yes, surprisingly we mods do talk to each other). On the other hand I'm not going to stand by and watch you insult the intelligence of the people visiting this forum. My place here isn't to indulge you!

    and this is what is called trolling

    No it is not. I have not trolled anywhere here. Moreover you've called trolls and flagged numerous people who aren't, by any conceivable measure. Have you read about one boy who cried "wolf"? If you haven't, I recommend it, granted it's a very long and complicated story but the end is a true masterpiece.

    with some additional definitions in case you do not understand some of more key words being used

    Nah, way too complicated for me. Can we just get back to name-calling? These were the times ...


  • Banned

    @kshegunov said in UI to PY but not window when run in python:

    @Denni-0 said in UI to PY but not window when run in python:

    Well even after doing all this unnecessary stuff to make a UI work that is not needed when using Python-Qt the way it was meant to be used -- the UI still has functional issues AND most importantly it is untouchable black-box code which any experienced programmer worth their salt knows that introducing these kind of things (untouchable black-box code) into a program is always dangerous and needs to be avoided unless absolutely necessary and even then these untouchable black-box APIs are almost always a headache. Not always mind you but enough to have given using them a very bad reputation in the industry

    None of this is even remotely close to true, nor is it any helpful, nor is your opinion worth any more than the next guy's. So I feel justified in classifying it in the "yet another useless platitude" folder. Thanks for playing!

    And what does C++ have to do with Python

    The same thing that your claim you've taught students has to do with the original question - absolutely nothing. That's why I inserted this illustration there, as yet another example of why what you write has practically no merit.

    That being said I have numerous years of experience using/teaching C, C++, C#, VB.Net, and the list goes on.

    Good for you. For me, *shrug*, I could care less, I only care about what you wrote, which has very little to do with the actual question. Which I'd be more than glad to remind you was:

    However, if I load the py file nothing happens when I run the file, I am guessing that the program is waiting for me to open the window, am I missing an obvious piece of code.

    So yeah I know what I am talking about and when I do not know I either find out the facts or I simply state I do not know -- I am not omnipotent nor do I pretend to be so

    ... except when you crusade to show that you are ...

    -- further I teach all my students to think for themselves and that goes for anything I share with them as I do not want them to be lemmings like many other programmers out there seem to be.

    Oh thanks, we lemmings, designer-lovers and akin really value your opinion on our miserable existence. Get a life, dude.

    Analyze it, know it and then make your own decision.

    I already have, I have used the designer for years. That's how I know what needs to be done to show the window when I don't know any python. Surprise, surprise, I do the same in C++.

    As for others out there being knowledgeable sure and some of them are even students of mine and they teach me a thing or two from time to time. As a teacher I know that I am never going to be the source of all information nor do I want to be -- I am simply A source that encourages folks to do their own research your warning is totally meaningless and almost troll like in presentation

    It wasn't a warning. I was paraphrasing your pretentious tone for sarcastic purposes.

    (which I will be notifying moderators about).

    Bite me. You know where you can find the admin, since he's already replied to this thread. If I warrant a ban for trolling, so be it, I take responsibility for what I say and do. I'm still going to say/do it, but I don't run from the consequences. As for how trolling it was, it seems to me that the local community disagrees with you. I've rarely seen people being downvoted, and even more so someone as downvoted as you. A piece of unsolicited advice: take note of that.

    Yes I have and No it does not generate normal code in the sense of it being used within Python it generates XML Code

    For which there's the user interface compiler to bring to python, just the same as for C++. And yes, I've used these two things interchangeably as this is the usual an recommended way the toolchain is used.

    So your comment is groundless and factless as much of this post is.

    Maybe, or just maybe that's how you choose to read it so it suits your crusade against the evil windmills.

    And you assume I do not know how the engine works

    You don't seem to be distinguishing between a statement of fact and a metaphor. I can't even be angry for this, just saddened.

    but I do know how it works in concept

    I also know how a nuclear power plant works in concept, I'm not going to be building one in my basement. "In concept" isn't knowing "in detail", sorry to break your bubble.

    What I teach is using tools for what they were meant to be used for and that tool was not meant to generate Python-Qt code

    I happen to know that this tool (along with its cousin the py uic) are there exactly for that reason.

    Again it is obvious to me that you were not addressing the problem at hand at all

    I actually had addressed the problem.

    but some seem to be soap boxing an issue you have

    An issue with you personally, no. As a matter of fact I suggested you don't get banned the first time around (yes, surprisingly we mods do talk to each other). On the other hand I'm not going to stand by and watch you insult the intelligence of the people visiting this forum. My place here isn't to indulge you!

    and this is what is called trolling

    No it is not. I have not trolled anywhere here. Moreover you've called trolls and flagged numerous people who aren't, by any conceivable measure. Have you read about one boy who cried "wolf"? If you haven't, I recommend it, granted it's a very long and complicated story but the end is a true masterpiece.

    with some additional definitions in case you do not understand some of more key words being used

    Nah, way too complicated for me. Can we just get back to name-calling? These were the times ...

    Well it is obvious that there very many things that are too complicated for you to understand as such I end my conversation with you and do know that you have been reported for your Trolling all I can do is hope that the Moderator and/or Owner will address your completely off-topic abusive comments


  • Moderators

    Again a topic has been derailed into something completely unrelated. Please only respond to the topic if it is relevant to what the OP had asked, anything else will be removed.

    And as a reminder - read the code of conduct.


Log in to reply