Git Product home page Git Product logo

Comments (6)

kayhayen avatar kayhayen commented on June 23, 2024

Are you able to provide a minimal example of the two forms, one working or not, as sources files in a zip file? I am a bit confused what is supposed to not work and what is.

from nuitka.

dimaslanjaka avatar dimaslanjaka commented on June 23, 2024

Are you able to provide a minimal example of the two forms, one working or not, as sources files in a zip file? I am a bit confused what is supposed to not work and what is.

i should invite you to my private repo, you can check where the bug on file main_proxy_manager.py

from nuitka.

dimaslanjaka avatar dimaslanjaka commented on June 23, 2024

Are you able to provide a minimal example of the two forms, one working or not, as sources files in a zip file? I am a bit confused what is supposed to not work and what is.

acc, then you can check the codes to fixing nuitka

image

from nuitka.

kayhayen avatar kayhayen commented on June 23, 2024

I don't execute other people's code for security reasons, at least not for free. I really need a small reproducer. From what you are saying, that should be easy to create for you, and hard for me.

from nuitka.

dimaslanjaka avatar dimaslanjaka commented on June 23, 2024

I don't execute other people's code for security reasons, at least not for free. I really need a small reproducer. From what you are saying, that should be easy to create for you, and hard for me.

whole codes already included on this post. I was tried create sample codes like this

import sys
from PySide6.QtWidgets import QApplication, QMainWindow, QPushButton, QVBoxLayout, QWidget, QTextEdit
from PySide6.QtCore import Slot
from src.pyside.Worker import WorkerThread


class MainWindow(QMainWindow):
    def __init__(self):
        super().__init__()
        self.init_ui()

    def init_ui(self):
        self.setWindowTitle('PySide6 Background Task Example')
        self.setGeometry(100, 100, 400, 300)

        # Main layout
        layout = QVBoxLayout()

        # Text area to display results
        self.text_area = QTextEdit()
        self.text_area.setReadOnly(True)
        layout.addWidget(self.text_area)

        # Button to start the background task
        self.start_button = QPushButton('Start Task')
        self.start_button.clicked.connect(self.start_task)
        layout.addWidget(self.start_button)

        # Set the central widget
        central_widget = QWidget()
        central_widget.setLayout(layout)
        self.setCentralWidget(central_widget)

    def start_task(self):
        # Disable the button to prevent multiple clicks
        self.start_button.setEnabled(False)
        self.text_area.append("Task started...")

        # Create and start the worker thread with a custom function and arguments
        self.worker_thread = WorkerThread(self.long_running_task, 5)
        self.worker_thread.result_signal.connect(self.task_finished)
        self.worker_thread.start()

    @Slot(str)
    def task_finished(self, result):
        # Enable the button again and display the result
        self.start_button.setEnabled(True)
        self.text_area.append(result)

    def long_running_task(self, seconds):
        import time
        time.sleep(seconds)  # Simulate a long-running task
        return f"Task completed after {seconds} seconds!"


if __name__ == '__main__':
    app = QApplication(sys.argv)
    main_window = MainWindow()
    main_window.show()
    sys.exit(app.exec())

Then I built with Nuitka, no problem occurred. I'm also confused >.<

from nuitka.

kayhayen avatar kayhayen commented on June 23, 2024

It's not strictly my task to resolve your confusion. If you have something that is reproducible, I will gladly look at it, but for now I do not believe that the issue exists. I can be proven wrong and I invite you, and I definitely think there might be issues behind it, but I think you need to consider this page: https://nuitka.net/user-documentation/common-issue-solutions.html

from nuitka.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.