kandi X-RAY | qtbase Summary
kandi X-RAY | qtbase Summary
Qt Base (Core, Gui, Widgets, Network, ...)
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of qtbase
qtbase Key Features
qtbase Examples and Code Snippets
Community Discussions
Trending Discussions on qtbase
QUESTION
I am fairly very new to Ubuntu/Linux and am currently running into an issue with getting an ERROR: Unknown command not found. I am trying configure Qt for cross compilation for a raspberry pi. I have looked up for similar issues but to no avail unfortunately.
The code I am running is as follows
...ANSWER
Answered 2021-Jun-09 at 07:15Configure
is not recognizing the skip
option, because you are running it from qtbase
folder. Try to tun configure from the top qt folder.
QUESTION
I'm trying to show a gif file in QT app, using the approach provided in the link: https://code.qt.io/cgit/qt/qtbase.git/tree/examples/widgets/widgets/movie?h=5.15
Approach makes use of QMovie object set in a QLabel.
The example works well and fine.
But if I enable High DPI scaling for the app, the gif becomes all pixelated. Please see the screenshots below.
This is the line that I add to enable High DPI scaling.
...ANSWER
Answered 2021-Apr-26 at 11:28A GIF picture cannot have more than 256 unique colours. When you load such an image into Qt, it is internally represented in that exact format with the palette (of 256 colours) from the GIF representation, even if your hardware might be able to display many more colours.
This also means that when you scale such an image, Qt is not allowed to extend the colour space to render in-between colours - This means that scaled GIF pictures generally have to look much worse than scaled high-colour images.
The solution to this is either to transform the QImage you created from a GIF picture into a format with a larger colour space before scaling it (with QImage::convertToFormat) or, better still, don't use GIF images at all. After all, GIF is a format developed 30 years ago and has never really been updated to adapt to modern hardware, and using it, you artificially limit your programs to the capabilities of that format.
QUESTION
I have a code in Python Flask where I generate pdf files using an HTML template. The code works just fine when I run it alone, but when I try to run it inside a Docker container, as soon as I call the endpoint that generates the report the docker crashes and resets. It just stays loading then it returns an error (in Postman which I'm using to test).
The code for the PDF is as follows:
...ANSWER
Answered 2021-Apr-28 at 16:24Let's fix this.
I've managed to run wkhtmltopdf
isolated on a docker container.
Dockerfile:
QUESTION
I'm trying to learn how to implement Drag and Drop to model/view settings in Qt. As an exercise, I attempted to do that to the Editable Tree Model example available at the Qt web site:
To extend it with Drag and Drop, I followed the instructions in Qt's documentation on "Using Drag and Drop with View Items", more specifically "Using model/view classes".
I placed the code for my attempt at a GitHub repository. The main modifications are below but there are other important ones; here are the full changes according to the documentation.
...ANSWER
Answered 2021-Apr-28 at 07:48The model provided by the example only accepts setting data with role Qt::EditRole
. See line 263 in treemodel.cpp
QUESTION
I'm trying to make a live plotting graph class in qt and the scrolling works. But when watching my program in Task Manager I recognized that the CPU and RAM usage increases by time (and data).
So I thought it would be a good style to use the remove function to delete data which is not shown anyway. Here's my code:
...ANSWER
Answered 2021-Mar-31 at 13:02You are confusing the index of the data points in the vector m_series
and their x
value. When the data point with x = old_x_min
goes out of the window you want to display, then that data point is at index 0
not at index old_x_min
.
Replace
QUESTION
I want to build Qt 6
with prebuilt MySQL/OpenSSL
libs to try out new features, but I have some issues with configure parameters.
For example, I have such configure parameters:
configure.bat -debug -static -static-runtime -confirm-license -opensource -nomake examples -no-ltcg -sql-mysql -openssl-linked -prefix "C:\Test\6.0.0\msvc2019_64"
When I add the -sql-mysql
or -openssl-linked
parameters I got the following issue:
ANSWER
Answered 2021-Feb-23 at 16:50Thanks to lixinwei (https://bugreports.qt.io/browse/QTBUG-89993) the issue is resolved. Now, it successfully finds the OpenSSL
and MySQL libs
.
Cmake paramaters:
QUESTION
I have been making C++
example code to PySide2
.
I review fetchMore example over and over again.
Where is the wrong point in this conversion?
The biggest problems is in data method.
role is always SizeHintRole
.
Why?
Here is the code.
...ANSWER
Answered 2021-Jan-20 at 15:30The problem is in the last return of data()
, which should not return 0.
When returning 0, the view or its delegate(s) try to convert the value in a suitable type for that role, and since one of the first roles requested by a view is the size hint (and cannot convert your returned "0" to a valid size hint), the result is that it will not request any other data: since the size is invalid, the item is considered hidden, thus there's no need to ask for other roles.
Just remove the return 0
at the end of data()
, as the implicit return
is enough.
PS: the self.emit
syntax you're using is considered obsolete, change that to self.numberPopulated.emit(itemsToFetch)
; also, explicit overloads are not required for signals that only have a single signature, so you can remove the ["QString"]
from textChanged
and [int]
from numberPopulated
.
I also suggest you to always leave at least a blank line between functions, as it makes your code much more readable.
QUESTION
Can RegOpenKeyEx
/RegCreateKeyEx
return NULL
as a valid HKEY
value?
I'm analyzing the source code of QSettings
(https://code.woboq.org/qt5/qtbase/src/corelib/io/qsettings_win.cpp.html#_ZL15createOrOpenKeyiiRK7QStringi).
If NULL
is a possible valid value for HKEY
, then QSettings
's implementation under Windows has bug.
ANSWER
Answered 2021-Jan-14 at 18:13Can
RegOpenKeyEx
/RegCreateKeyEx
return NULL as a valid HKEY value?
No, a valid opened HKEY
is never NULL.
On the other hand, the value of the returned HKEY
is indeterminate if these functions fail. The Win32 API documentation does not say one way or the other if the HKEY
gets set to NULL on failure, so you can't rely solely on checking the returned HKEY
for NULL vs non-NULL when calling these functions, eg:
QUESTION
The recently released Qt 6.0.0 has changed the distribution of the qtimageformats. Thay are no longer prebuilt and have to be built locally.
I checked out the QT git sources as described here.
...ANSWER
Answered 2020-Dec-10 at 16:10Finally, I was successful. I found the Phoronix article about Qt6.
Qt6 started to use the conan.io package manager. So the sources provided by the Qt installer are sufficient. It downloads sources of the qtimageformats to the following location ~/Qt/AdditionalLibraries/Qt/qtimageformats-6.0.0.
Conan will do the rest.
MacOS [shared libs]QUESTION
I want to connect to a MySQL database, only every time I try I get this error:
...ANSWER
Answered 2020-Dec-01 at 22:53After I did everything I described in the edit I solved it. Basically I went to QtCreator, added a new library to the project (C:\Program Files\MySQL\MySQL Connector C 6.1\libmysql.lib
) and now everything works properly!
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install qtbase
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page