FAQ Database Discussion Community


Building QtWebEngine for Raspberry Pi2 using Yocto Poky - vcos_platform_types.h: No such file or directory

chromium,raspberry-pi2,yocto,qt5.4,qtwebengine
Context NUC on Debian 7.8 for building my images with Yocto Yocto Poky REQUIREMENT Q5 QtWebEngine + QML plugins + SSH TARGET Raspberry Pi 2 Heavily inspired by this excellent tutorial for Raspberry Pi Yocto Poky fido branch mkdir -p ~/yocto/dl cd ~/yocto git clone -b fido git://git.yoctoproject.org/poky poky cd...

Qt4 to Qt5: QPainter::drawPixmapFragments() with 5 arguments - how to solve? (Updated)

c++,qt,qt5,qt4.8,qt5.4
Qt 4.8 (4.8.6) has a QPainter::drawPixmapFragments() overloaded function with 5 arguments: void drawPixmapFragments(const QRectF *targetRects, const QRectF *sourceRects, int fragmentCount, const QPixmap &pixmap, PixmapFragmentHints hints = 0); Qt 5 (5.4.1) has no such function, it has only one (same as in Qt 4.8) with 4 arguments: void drawPixmapFragments(const PixmapFragment *fragments,...

Easy readout from QDataStream to QStringList

c++,qt,c++11,qt5,qt5.4
I am reading from a binary file, and want to insert into a QList. Is there an easier way to do the following? (e.g. in one line) QStringList traceNames; for(qint64 i=0; i<numTraces; i++) { QString name; stream >> name; traceNames << name; } stream is a QDataStream. I was thinking...

Qt application trying to load platform plugin “xcb” instead of “eglfs”

arm,qml,qtwebkit,yocto,qt5.4
Built Raspberry Pi 2 linux distro including Qt5.4 + QtWebKit + QML plugin using Yocto on fido branch See tutorial Testing with the following QML script [email protected]:~# more webkit3.qml import QtQuick 2.0 import QtQuick.Controls 1.0 import QtWebKit 3.0 ScrollView { width: 640 height: 480 WebView { id: webview url: "http://qt-project.org"...

QtQuick: QQmlApplicationEngine failed to load component qrc:/main.qml:23 Invalid attached object assignment

c++,qt,qml,qt-quick,qt5.4
Given my thoughts below am I barking up the wrong tree? Or provided the information below am I misusing Qt API to get the error in the title? I am trying to modify the sample at http://doc.qt.io/qt-5/qtquick-scenegraph-openglunderqml-example.html to work with the default QtQuick project generated with Qt Creator 3.3.0 (opensource)...

Qt child QGraphicItem does not use parent coordinate system

c++,qt,qt5.4
I'm trying to create a BuildingTile class which has QGraphicsRectItem as base. In this BuildingTile I'm trying to add QGraphicsEllipseItems and a QGraphicsSimpleTextItem but these do not use my BuildingTile's coordinate system although they say on http://doc.qt.io/qt-5/graphicsview.html: "Child coordinates are relative to the parent's coordinates. If the child is untransformed,...

QTextDocument in QAbstractItemDelegate paint method

qt,qt5.4,qtextdocument
I have a class which inherits QAbstractItemDelegate and I use QTextDocument inside the paint() method. My model contains two items, but when I run my qt application, the items are drawn in the first item of QListView. CODE void ProductItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const { bool...

QScintilla Font Combo Box Confliction

qt,qt4,qt5,qt5.4,qscintilla
I am using QScintilla in a Qt program of mine. I have a lexer set, so to change the font I have to change the font of the lexer. I have a font combo box so when I change the font it should change the font of the lexer. However,...

Usage of tr( ) in Button Titles so on created by the UI Editor

c++,qt,translation,qt5.4
I understand that using tr( ) makes it possible to translate your text into any language using QTranslator Class for example. Now how do you do it for button titles , window titles etc. created via the UI Editor rather than by code. Do I have to set the text...

Qt5 QML QVariantMap Binding with change notifications

binding,qml,qt5,qt5.4
I have QVariantMap (not QObject, because property names are not predefined). And I inject QVariantMap into QML root context to use property values for binding. The problem is that when I change QVariantMap or even when I change QVariantMap and call setContextProperty for updated object, or when I update (with...

Undefined reference to QAbstractListModel::postion

qt,qt5.4,qabstractlistmodel
I'm getting this error when implementing QAbstractListModel. ./debug\moc_ObjectModel.o:moc_ObjectModel.cpp:(.rdata$_ZTV12ObjectModel[__ZTV12ObjectModel]+0x38): undefined reference to `QAbstractListModel::position(int, int, QModelIndex const&) const' collect2.exe: error: ld returned 1 exit status Building the project was successful before I add insert and remove method to my model. First, I add the insert and remove method but forgot to call...

How to move the focus from a QLineEdit to a QTableView editable cell

qt,qwidget,qtableview,qlineedit,qt5.4
I am using a QMainWindow with few QLineEdits and with some QPushButtons in it. When the focus is in a QLineEdit (if I type something in the QLineEdit) and if I press the F5 key, I want to show a QDialog. That QDialog contains a QTableView. My question is, when...

Qt: Strange behavior when calling setGeometry on a widget in QScrollArea

qt,qscrollarea,qt5.4
My environment is the following: Qt 5.4, build from source with -platform win32-msvc2013 -opengl desktop -no-icu -skip webkit Visual Studio 2013 Windows 7 x64 Consider the following setup (A QScrollArea containing a centered widget with fixed size): QScrollArea scrollArea; scrollArea.setAlignment(Qt::AlignCenter); scrollArea.setWidgetResizable(false); QWidget scrollAreaWidgetContents; scrollArea.setWidget(scrollAreaWidgetContents); Now, I want to resize that...

Isn't the line QProcess *p redundant?

c++,qt,qprocess,redundancy,qt5.4
I've stumbled across this GitHub Project. While I don't agree with the code in general I can't wrap my mind about the line: QProcess *p; and p=*it; Am I wrong when I feel like creating a new pointer there is completely redundant or is there some purpose of it I'm...

WINAPI cursor click position on application window

c++,windows,api,winapi,qt5.4
I need to write a small program that can know where the user click the button or somehow on a application windows whatever the application windows change the size . Through use the windows API, now I can only get the global cursor click position. I find a small program...

“module “QtQuick” is not installed” (Android porting)

android,c++,qt,porting,qt5.4
I'm trying to porting my application to android with qt5.4 but I have this error: W/Qt (30916): qrc:/qml/FrontEnd.qml:1 ((null)): qrc:/qml/FrontEnd.qml:1:1: module "QtQuick" is not installed This is my .pro TEMPLATE = app TARGET = sandbox-build-android QT+= qml quick widgets printsupport xml svg INCLUDEPATH += [...]# my include path # Input...

QWebView or QWebEngineView

qt,qt5,qtwebkit,qt5.4,qtwebengine
Starting new project today (well, not today, but in week or two), what should one use? QWebView or QWebEngineView? Are there any functional differences between those two? If I understand correctly, QWebView is webkit, while QWebEngineView is blink. Are there any differences to the programmer? And most importantly, does one...

how to use the macdeployqt -codesign option with Qt 5.4.1

osx,qt,code-signing,qt5.4,macdeployqt
According to this Qt blog post: The -deep option signs the app bundle recursively, including contained frameworks. While convenient to use, –deep is documented for “emergency repairs and temporary adjustments only“. As of Qt 5.4 macdeployqt has a -codesign option that recursively signs the app bundle without using –deep. But...

Qt 5.4/Qml: Prevent binding loop

c++,qt,qml,qt5,qt5.4
I have a global singleton "Settings" which holds application settings. When I try to run the following code I get a QML CheckBox: Binding loop detected for property "checked": CheckBox { checked: Settings.someSetting onCheckedChanged: { Settings.someSetting = checked; } } It is obvious why this error occurs, but how can...

OpenSSL issue under 64bit server and none under same 32bit (QT app)

c++,qt,openssl,64bit,qt5.4
After upgrading the QT from 4.8.5 to 5.4.0 we had an issue with the server side. The build is done under Debian wheezy (64bit) and also on a 32bit machine as well. When we start the server on the 32bit machine, using the command openssl s_client -connect xxx.xxx.xxx.xxx:4443 we receive...

How does QtConcurrent::run wind up on main thread?

qt,qtnetwork,qtconcurrent,qt5.4
I've built a QFuture based asynchronous networking facade in my application. Roughly it works like this: namespace NetworkFacade { QByteArray syncGet(const QUrl& url) { QEventLoop l; QByteArray rc; get(url, [&](const QByteArray& ba) { rc = ba; l.quit(); }); l.exec(); return rc; } void get(const QUrl& url, const std::function<void (const QByteArray&)>&...

how to suppress namespace prefix with Qt5.4 QXmlStreamWriter

xml,qt,qt5,xml-namespaces,qt5.4
I have this dictionary.xml: <?xml version="1.0" encoding="UTF-8"?> <DictionarySet xmlns:mc="urn:fmosoft-map-creator" xmlns="urn:fmosoft-map-creator" Version="1"> <Dictionary SourceLanguage="en_US" SourceLanguageIsPredefined="true" TargetLanguage="es" TargetLanguageIsPredefined="true"> <Translation Source="asdf" Target="fdsa"/> <Translation Source="xyz" Target="jkl"/> </Dictionary> <Dictionary SourceLanguage="en_US" SourceLanguageIsPredefined="true" TargetLanguage="pt"...

Deploying to Android results in file not found after adding QtQuick Controls

android,qt,deployment,qml,qt5.4
After importing QtQuick.Controls 1.2 and using StackedWidget component, I now get an error when deploying to Android as seen below. The missing file AnimationDrawable.qml is not missing from the Android build directory so I do not understand why it is not packaged with the APK. It deploys fine when I...

Context Menu in QGraphicsWidget using addAction()

qt,qt5.4
I have a custom QGraphicsWidget in Qt5.4 to which I'm trying to add a context menu. In the item's init() routine I add two QAction items like this: bool MyGraphicsWidget::init() { this->addAction(new QAction("Rotate &Left", this)); this->addAction(new QAction("Rotate &Right", this)); } But when I try to pull up the context menu...