Questions tagged [qt5]

Questions specifically for version 5.x of the Qt library. If your question applies to other versions of Qt, use the tag [tag:qt4] or [tag:qt3]. It is recommended to use with the tag [tag:qt].

Qt (pronounced officially as cute (/kyut/) though commonly pronounced as (/ˈkyu ti/)) is a cross-platform application development framework widely used for the development of GUI programs (in which case it is known as a widget toolkit), and also used for developing non-GUI programs such as console tools and servers. wikipedia

Qt is developed and maintained by The Qt Company which is subsidiary of Digia.

Qt also provides an integrated development environment named Qt Creator. Though it mainly aims at creating Qt applications, it can be used to create regular C++ applications too.

Resources:

Tagging recommendation:

You will often see questions tagged specifically as , or to indicate that the user experiences the problem in Qt 3.x, 4.x or 5.x, respectively. The default when version information is lacking is to assume version 5.x of the API.

8717 questions
3
votes
1 answer

Set specific color in qt5 webview transparent

I'm developing Qt5 webview based application and I need to make a specific color inside webview be transparent or have an alpha channel. For example, web page, loaded into webview, may have fullscreen div with a background color (black in most…
VaMpir
  • 61
  • 2
  • 6
3
votes
1 answer

access qml element from javascript

Please, is it possible to access and change a property of a qml element from javascript function? I read that document.getElementById() should do the trick, but when I try that I get: ReferenceError: document is not defined Test.qml import…
miro
  • 809
  • 10
  • 25
3
votes
0 answers

Cannot open Qt windows in other screens than primary with Qt5 on Ubuntu Linux

I'm porting a Qt 4.8.x program to Qt 5.3. It works fine under Qt 4.8 when my Ubuntu 12.04 X11 server is running Xinerama mode with Nvidia hardware. I previously used QtDesktopWidget to retrieve multiple screens and their geometry (I have five…
3
votes
1 answer

How to get the total time of an audio file?

How to get the total time of an audio file? I am trying this: QMediaPlayer* audioPlayer = new QMediaPlayer(); audioPlayer->setMedia(QUrl::fromLocalFile("F:/Audio/mysong.mp3")); audioPlayer->duration(); // return 0 but all the time the function…
user3430722
  • 345
  • 1
  • 5
  • 12
3
votes
1 answer

QDir mkpath doesn't create directory on android

Every time I launch application, mkpath is called as if the directory was not created previously despite I always get 'path created' log. Do I need to specify any special privileges to save into the internal storage? mypath looks like…
Nadarian
  • 962
  • 9
  • 22
3
votes
2 answers

Cannot use QPoint as QHASH key

I tried using this code: QPoint pt; QHash hexes; hexes.contains(pt); and I get the error: error: no matching function for call to ‘qHash(const QPoint&)’ But if I replace 'QPoint' with 'int' it compiles just fine. Is it possible to…
user2602914
  • 301
  • 3
  • 11
3
votes
2 answers

Compiling Qt 5.3 from sources fails

I am compiling Qt 5.3 from sources and I am getting errors, in particular this one: error: ‘QV4::Property::Property(const QV4::Property&)’ is private My configure options are: ./configure -no-compile-examples -no-opengl -no-openssl…
Nulik
  • 6,748
  • 10
  • 60
  • 129
3
votes
3 answers

Compile Qt5 without GUI support on Linux ARM

I'm having troubles getting Qt5 working without GUI elements on my Cortex-A9 board due the OpenGL dependencies (i.e. OpenGL ES2). I am running a Ubuntu 14.04 rootfs. Is there any way to disable the generation of GUI classes, starting from git…
madduci
  • 2,635
  • 1
  • 32
  • 51
3
votes
1 answer

Taking Screenshot of Full Desktop with Qt5

I figured out how to take a screenshot of the desktop today with Qt5 from an included example which gets the primary screen, grabs it, and then saves it. I'm translating the code from Python without testing so if there's a small syntax error, then…
David Ludwig
  • 967
  • 2
  • 12
  • 26
3
votes
1 answer

Qt 5.3 Can't make QCompass (QSensor) work on Windows 8.1

I can't make sensors works on my Asus Transformer T100. Magnetometer and Compass don't start, and I have fake value from the accelerometer (always x=0, y=9.8, z=0). I always get the same result, even with my laptop : first…
svalsesia
  • 303
  • 2
  • 13
3
votes
1 answer

Using dialogs in QML

What if at some moment of time I need to get user input by calling dialog window or something like that. What is the best way to implement this using QML? Any analogs of prompt in js?
Bolein95
  • 2,947
  • 2
  • 26
  • 31
3
votes
1 answer

How to display table from SQLite database in QTableView widget?

I created a SQLite database called "test.db". It has only one table called "table1" which is not an empty table. I tried to display "table1" in QTableView widget but the widget displayed nothing. The database was connected and Qt Createor didn't…
user3654736
  • 55
  • 1
  • 5
3
votes
2 answers

Qt 5.2.1: cannot parse date/time

I am having a problem in parsing a date from QString using Qt 5.2.1... I am using the following code: QString value = "1979-10-27T04:00:00.000"; QDateTime dt = QDateTime::fromString(value, "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'zzz"); but the returned…
Morix Dev
  • 2,700
  • 1
  • 28
  • 49
3
votes
1 answer

Porting QFtp in Qt4 to Qt5 using QNetworkAccessManager

Instead of QFtp in Qt4.8.2 I am now in the process of porting to QNetworkAccessManager in Qt5.2.1 etc. I have the following questions: Is it possible to port QFtp::rawCommand("SITE UMASK 22"); to a solution based on QNetworkAccessManager? How do I…
user2672165
  • 2,986
  • 19
  • 27
3
votes
1 answer

LibQxT does not detect Qt version properly

I am trying to install LibQxT to use it with Qt5, so I downloaded the sources and as soon as I run the configure.bat there is an error: LibQxt requires 4.3 or newer but Qt 5.2.1 was detected. Searching on the web Ive found out that apparently it…
Victor
  • 907
  • 2
  • 17
  • 42