Skip to content

Language Bindings

You're using Qt with other languages than C++, eh? Post here!
853 Topics 3.3k Posts
  • Python/PyQt freeing of objects

    Solved
    5
    0 Votes
    5 Posts
    2k Views
    JonBJ

    @SGaist
    Great stuff --- I'll study that link.

  • 0 Votes
    55 Posts
    16k Views
    JonBJ

    @Xenoshell
    There is literally like one occurrence on the whole of the Interweb of your error in vainfo (va_openDriver() returns -1)!
    https://bugs.launchpad.net/ubuntu/+source/libva-utils/+bug/1719150
    It was suggested:

    Please install mesa-va-drivers and try gain.

    I suggest you try that.... :)

  • Convert .ui to .py file?

    Moved Unsolved
    5
    0 Votes
    5 Posts
    12k Views
    JonBJ

    @Ken_Du
    I use PyCharm as my Python/PyQt IDE, and I shan't be moving off that. But OOI does your eric really do much other than allow you to convert .ui to .py, which I see I can do via PyQt's pyuic5?

  • How i can check if char is '\'?

    Moved Unsolved
    5
    0 Votes
    5 Posts
    1k Views
    JonBJ

    @SGaist said in How i can check if char is '\'?:

    To add to @JonB: file_ += char would be even cleaner.

    I left it using the literal rather than the "variable", as it's not obvious from the context whether OP really wants the same char he's testing for appended or always a \, if you see what I mean!

  • How to jump millisecond in video?

    Moved Unsolved
    2
    0 Votes
    2 Posts
    735 Views
    SGaistS

    Hi,

    What résolution are you expecting ?

  • Build frames in GUI Program

    Moved Unsolved
    6
    0 Votes
    6 Posts
    1k Views
    SGaistS

    A quick google search with PyQt5 layout gives that nice article.

  • Adding video window

    Moved Unsolved
    4
    0 Votes
    4 Posts
    1k Views
    SGaistS

    Well... Then you can translate the example from the class detailed documentation in Python and you have a minimal video player.

  • 0 Votes
    3 Posts
    2k Views
    W

    @jazzycamel said in Picamera significant delay and low FPS, but low CPU and memory usage:

    Thanks this worked i also changed the camera parameters so it runs even faster.

    self._camera=PiCamera(sensor_mode=4,resolution='640x480',framerate=40).

    Now the only problem is when i try to capture using the worker thread is not responding to the signal ,this is also happening with the stop function its not responding to a button click or custom emit signal to stop the camera it just keeps running

    @pyqtSlot() def snapshot(self): self._looping=False self._camera.capture('image.jpg') self._looping=True stopcamera = pyqtSignal() self._thread = QThread() self.stopcamera.connect(self._camera.stop) self._thread.start() self.CameraSnap.clicked.connect(self._camera.snapshot) self.CameraBack.clicked.connect(self.functionstopcamera) def functionstopcamera(self): self.stopcamera.emit()
  • How I can to part?

    Moved Unsolved
    6
    0 Votes
    6 Posts
    2k Views
    mrjjM

    @Dl10

    Hi
    I think it exists

    https://www.youtube.com/watch?v=Dmo8eZG5I2w

    There you just place 4 qframes on center mainwindow
    Then right click (not on frames) and from layout menu
    select Grid layout

  • Adding to my project

    Moved Unsolved
    1
    0 Votes
    1 Posts
    627 Views
    No one has replied
  • QMdiSubWindow Buttons Merged With Menubar

    Unsolved
    3
    0 Votes
    3 Posts
    2k Views
    J

    @SGaist Thanks for the reply. It has the same behavior in the MATE desktop environment. So far I've also tried in Unity and Gnome 3.0 as well.

  • How can I delay but not time.sleep?

    Moved Unsolved
    3
    0 Votes
    3 Posts
    3k Views
    T

    @Dl10
    You may split the function and start a timer.. something like..
    from :

    testFunction(){ step1.. step2.. time.sleep().. step3.. }

    to

    testFunction(){ step1.. step2.. qtimer t; connect(&t,SIGNAL(timeOut()),this,SLOT(testFunction2())); t.start(2000); } testFunction2(){ step3... }

    PS: Syntax may vary.. this is a c++ code.. please convert it to pyqt5.. Hope this is what you are expecting...
    and thats what i understood from your post...

  • pyqt4 float slider

    Unsolved
    2
    0 Votes
    2 Posts
    801 Views
    SGaistS

    Hi and welcome to devnet,

    What slider are you talking about ?

  • Accessing the main window from Python

    Solved
    8
    0 Votes
    8 Posts
    17k Views
    JonBJ

    Well, for right or for wrong architecturally, I ended up writing a function (Python, but you get the drift :) ):

    def findMainWindow() -> typing.Union[QMainWindow, None]: # Global function to find the (open) QMainWindow in application app = QApplication.instance() for widget in app.topLevelWidgets(): if isinstance(widget, QMainWindow): return widget return None

    No Python global variables --- which I now understand, are about as "global" as the parochial village I live in, are misnamed really, and are brain-dead in the way they work :)

  • Two (probably) very simple questions

    Solved
    14
    0 Votes
    14 Posts
    9k Views
    S

    @jazzycamel That worked! How would I load a UI file in the Widget class? I tried using uic.loadUI(), but that seems to override the previous gui.

  • 0 Votes
    5 Posts
    2k Views
    J

    hmmm....
    right but i thing not in analog input/output.

  • Can we use python in qt?

    Moved Solved
    6
    0 Votes
    6 Posts
    2k Views
    tekojoT

    @JNBarchan it's being worked on. Getting something like that back up to date takes time. It was left behind for a long time.
    I mentioned it, as it will at some point be an option.

  • 0 Votes
    1 Posts
    858 Views
    No one has replied
  • 0 Votes
    24 Posts
    17k Views
    X

    Yeah i feel like i do sudo apt-get update && upgrade at least once a day. I just checked about SIP and i compiled it from source but i cant remember if i actually used the command make and make install. Does that mean i have to reinstall pyqt5 again? I guess i just open a new thread. Thanks for all the help @SGaist

  • how to remove obsolete entries from .ts linguist file

    Solved
    3
    1 Votes
    3 Posts
    8k Views
    L

    Hi @J-Hilk
    thanks for your reply. Your help is much appreciated :)