News for hackers. Stuff that matters.
Re:Show HN: Cross-platform desktop applications with PyQT by ThePhysicist on Tuesday February 06, 2018 @03:09PM (#16319133)
I would disagree with this as I've created many small apps using QT, and getting started is much easier than with Electron (in my opinion). It is as easy as this:

    import sys
    from PyQt5.QtWidgets import QApplication, QWidget

    if __name__ == '__main__':
        
        app = QApplication(sys.argv)

        w = QWidget()
        w.setWindowTitle('Hello, world!')
        w.show()
        
Also, styling apps in QT is really easy, in fact you can even use CSS: http://doc.qt.io/archives/qt-4.8/stylesheet-examples.html
Re:Show HN: Cross-platform desktop applications with PyQT by moocowtruck on Tuesday February 06, 2018 @03:42PM (#16319396)
what do i need installed to get started with this, i have your code but what do i do next?
Re:Show HN: Cross-platform desktop applications with PyQT by mherrmann on Tuesday February 06, 2018 @03:42PM (#16319402)
Re:Show HN: Cross-platform desktop applications with PyQT by kbutler on Tuesday February 06, 2018 @04:33PM (#16320019)
That's his point. With a web app, his experience tells him he can run the code within an environment that he's used to.

With PyQt, he needs to download and install PyQt. When ready to ship, he needs to figure out how to build it into an app that can be delivered to clients.

With web technologies, he knows how to get deliver code in ways it can be loaded in a web browser, and how he can deliver code to end users.

Though to use that web code with Electron, he needs to download and install electron and figure out how to build it into an app that can be delivered to clients.

Re:Show HN: Cross-platform desktop applications with PyQT by FridgeSeal on Tuesday February 06, 2018 @05:01PM (#16320306)
Yes god forbid anyone ever need to learn something new to do something different.

The web has a lot of great advantages for sure, but native applications have advantages and can do things that are unwieldy and inefficient via the web.

Re:Show HN: Cross-platform desktop applications with PyQT by moocowtruck on Friday February 16, 2018 @01:42PM (#16394694)
>Yes god forbid anyone ever need to learn something new to do something different.

i'm just trying to act as if people do when i suggest them learn new programming languages :) or any things which they aren't used to for that matter.

Re:Show HN: Cross-platform desktop applications with PyQT by moocowtruck on Friday February 16, 2018 @01:39PM (#16394662)
thank you kbutler! (don't forget i'd also need qt to use py qt)
Re:Show HN: Cross-platform desktop applications with PyQT by aw3c2 on Tuesday February 06, 2018 @04:01PM (#16319575)
You need pyqt5 installed. Then just do "python filename.py".
Re:Show HN: Cross-platform desktop applications with PyQT by jancsika on Tuesday February 06, 2018 @04:19PM (#16319844)
At least in nw.js which is a similar toolkit to Electron:

{ "name": "helloworld", "main": "index.html" }

And index.html is just whatever HTML web page you want, like "<html><herd><title>Hello World</title></herd><body>Hello World</body></html>". You could also use a javascript file as your "main" file if you want.

Even when you screw up the HTML it will still load, which won't happen if you get your underscores wrong in your example.

Edit: removed erroneous formatting

Re:Show HN: Cross-platform desktop applications with PyQT by kelnos on Tuesday February 06, 2018 @04:34PM (#16320033)
> Even when you screw up the HTML it will still load

And this is why we have the wasteland of browser incompatibility that we're (still!) in. If something is wrong, it shoudn't work. Why are our standards so low that mistyping "head" as "herd" is considered something that heuristics should fix, rather than causing an error?

I mean, really, though, any decent IDE should flag that error for you in-line, anyway.

Re:Show HN: Cross-platform desktop applications with PyQT by aldarn on Thursday February 08, 2018 @01:55AM (#16330677)
Please tell me you're trolling... you actually want your software to run when there're errors and not have it blow up in your face? I don't even... ah screw it.
Re:Show HN: Cross-platform desktop applications with PyQT by Rotareti on Tuesday February 06, 2018 @06:15PM (#16320876)
> Even when you screw up the HTML it will still load, which won't happen if you get your underscores wrong in your example.

> Edit: removed erroneous formatting

This is beautiful!