Skip to content

Language Bindings

You're using Qt with other languages than C++, eh? Post here!
850 Topics 3.3k Posts
  • 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
    716 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
    624 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
    761 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
    8k 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
    844 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
    7k Views
    L

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

  • python + qt

    Moved Solved
    8
    0 Votes
    8 Posts
    3k Views
    U

    what i was describing, fits your 3rd point more.

    i would want to use c++ but for some part of the program, python does the job better than c++ that's why i also need python

    but maybe 1st point is good too. only pyqt

  • Python/PyQt heap, stack and deletion

    Solved
    7
    0 Votes
    7 Posts
    2k Views
    JonBJ

    @jsulm
    As I said, I totally understand that, I was not complaining, in this question I was just trying to clarify the Python behaviour so that I may bear it in mind when I read answers elsewhere. Which I believe we have now indeed covered here, thank you.

  • Replacing a widget with another one containing splitter

    Moved Unsolved
    6
    0 Votes
    6 Posts
    3k Views
    SGaistS

    What behaviour do you get with QSplitter ?