@Dl10 said in insert text to textbox and..:
I managed to thank you all !
it looks like you have solved your problem, so two things please: write a reply showing how you actually solved it :-) and two, don't forget to mark you post as solved. Thanks.
There is literally like one occurrence on the whole of the Interweb of your error in vainfo (va_openDriver() returns -1)!
It was suggested:
Please install mesa-va-drivers and try gain.
I suggest you try that.... :)
@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!
@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.
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
stopcamera = pyqtSignal()
self._thread = QThread()
You may split the function and start a timer.. something like..
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...
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):
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 :)
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
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
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.
Hey @m-sue , thanks for your reply.
The problem isn't that cursor.movePosition(QTextCursor.NextCharacter) does not move the cursor, but rather that self.setHtml() sends the cursor to the end regardless of its current position.
This does not explain why self.setTextCursor(cursor) has no effect.
I need to sort out an issue in an existing Ubuntu 10.04 system which runs qt4 package.
I assume the machine you are using is not the actual one which was used to do the compilation originally?
I tried to install gcc drivers and all, but still some compatibility issues are there and the issue still persists.
You are going to need to correctly install and set up g++.
It might help if you knew precisely what version of g++ the software you have was compiled for when working. But I don't suppose you know that?
I just updated one qt4 (*.pro) program
Do you actually need to update the .pro file for some reason? Or do you mean you've made a change in the source code?
@SGaist I need the slot send_console_log to be called when the signal written in ConsoleStream is emitted. When running the program with a normal while/for loop in the interpreter, the slot will be called becuase at that moment its non blocking. But the moment I add time.sleep into a loop, slots will only be called at the end when all the blocking is over. Thank you for looking into this.
@VRonin Oh yeah that was brought up a few times and I'm aware of it. But the stackoverflow version was not a good mvce. I suppose the GitHub version explains the issue better. The loop actually runs in an environment without access to qt UI or its variables. I'm still writing the buffer so will keep this posted unless I can't figure out the buffer flush myself.
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# Here we provide the necessary imports.
# The basic GUI widgets are located in QtGui module.
from PyQt4.QtGui import QApplication, QWidget
# Every PyQt4 application must create an application object.
# The application object is located in the QtGui module.
a = QApplication(sys.argv)
# The QWidget widget is the base class of all user interface objects in PyQt4.
# We provide the default constructor for QWidget. The default constructor has no parent.
# A widget with no parent is called a window.
w = QWidget()
w.resize(320, 240) # The resize() method resizes the widget.
w.setWindowTitle("Hello, World!") # Here we set the title for our window.
w.show() # The show() method displays the widget on the screen.
sys.exit(a.exec_()) # Finally, we enter the mainloop of the application.