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

Qt Window Transparency

I have a top level Frameless QMainWindow with Translucency. I have the undesirable effect of click-through (to the underlying window) in the transparent portions of the window. int main(int argc, char *argv[]) { QApplication a(argc, argv); …
user1055604
  • 1,624
  • 11
  • 28
3
votes
1 answer

Qt5 can't seem to find Objective-C libraries: unknown type name 'NSAutoreleasePool', etc

I have a Qt4.8.4 desktop application that builds and runs fine on my Macbook Pro, running Mountain Lion with Xcode 5.0.2, using Qt Creator 2.7.0 with Qt 4.8.4 and GCC (x86 64bit). I am trying to port my application to Qt 5.2.1. My code is C++ with…
David Burson
  • 2,947
  • 7
  • 32
  • 55
3
votes
1 answer

How to use QMessageBox in Qt 5?

So I am making a program in Qt 5.2.1 . What I need is, when the user clicks a button, a warning appears, if the user clicks 'Ok' then program continues and if he clicks 'Cancel' nothing happens. How do I do this? I'm a total newbie to Qt.
user121273
  • 59
  • 1
  • 2
  • 9
3
votes
2 answers

How can I set WebView content scale (qml QT 5.2)

I use qml WebView QT 5.2. WebView { anchors.fill: parent url: "http://google.com" } Loaded page content is scaled depending on WebView width. How can I get default scale like in browser? left picture my WebView, right - Google…
Dima Portenko
  • 3,443
  • 5
  • 35
  • 48
3
votes
1 answer

Sending Ctrl+C event to a process launched using QProcess on Windows

I have a dialog which acts as a configurator for a console application. The dialog’s job is to offer the user a set of widgets (which mirror the options supported by the console application) and when user clicks on the “Start” button, the dialog…
Bharath
  • 75
  • 8
3
votes
8 answers

How to speed up C++ compilation

do you have any tips to really speed up a large C++ source code ? I compiled QT5 with last visual studio 2013 compiler, this took at least 3 hours with intel quad core 3.2GHz, 8GB memory and SSD drive. What solutions do I have if I want to do this…
hughes
  • 177
  • 1
  • 5
  • 11
3
votes
3 answers

Different alignment of widgets in QGridLayout

The following code (Qt 5, same behaviour with Qt 4.8) uses a QGridLayout to add widgets above and to the left of a QScrollArea (to serve as a kind of header later): #include #include #include #include…
Andreas Fester
  • 36,091
  • 7
  • 95
  • 123
3
votes
2 answers

Extract menu action data in receiving function or slot

In my menu, I am setting data to the menu actions. How can I extract that data in my slot? Or even better, instead of connecting a slot, can I also connect a member function that is able to extract the action data (like in the 1st connect)? The…
user2366975
  • 4,350
  • 9
  • 47
  • 87
3
votes
1 answer

How do I place dynamic content into a QML component

I'm having a lot of trouble creating extendable components in QML. There are techniques which work but what I'd like to do is something like this: //Outline.qml Rectangle { color: 'red' //Children are inserted here } //main.qml Rectangle { …
Daniel B. Chapman
  • 4,647
  • 32
  • 42
3
votes
2 answers

Qt 5 Mac toolbar woes

I am trying to make a very simple toolbar in a QMainWindow on a Mac, with Qt 5.2.1, with not a single satisfaction. I was using still Qt 4.8 but I thought I'd give Qt5 a try. As QtMacExtras are concerned, I don't find the native toolbar class…
senseiwa
  • 2,369
  • 3
  • 24
  • 47
3
votes
1 answer

Qt5 C++ connect triggered QAction to a member function

Why can't I connect the action to call the function if triggered? I thought that I've understood the syntax according to this source that states one can call a function directly. void Traymenu::createMainContextMenu(){ QAction *actionNewNote =…
user2366975
  • 4,350
  • 9
  • 47
  • 87
3
votes
1 answer

How to send SMS in Qt for Android?

What is the official API in Qt5.2 (which started supporting Android and iOS officially) for sending text messages? or generally the Messaging API.
Mousa
  • 2,190
  • 3
  • 21
  • 34
3
votes
1 answer

Why does QtGUI not include all GUI elements in Qt 5

I watched VoidRealm tutorial, and he easily include QtGui and start using it! but i do the same thing and it doesnt work for me! for example my code doesnt know the QWidget until i include QLabel! or all other Gui element... #include…
BlackMB
  • 230
  • 6
  • 20
3
votes
1 answer

How to read widgets from the .ui file in qt5?

I am trying to get the list of widgets from a .ui files. So here is a bit of code: QUiLoader loader; QFile file(fname); file.open(QFile::ReadOnly); QWidget *myWidget = loader.load(&file, this); file.close(); …
amol01
  • 1,823
  • 4
  • 21
  • 35
3
votes
1 answer

How to access gyroscope form Qt5.2 Quick 2 project on Android?

I have created simple Qt Quick 2 project. I want to access gyroscope. import QtQuick 2.1 import QtSensors 5.0 Rectangle { id: root color: "black" GyroscopeReading { onXChanged: { } onYChanged: { } …
dasg
  • 321
  • 9
  • 18
1 2 3
99
100