Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. qt 5.7
    Log in to post

    • UNSOLVED how to select the text on double click in qml spin box
      General and Desktop • qml qt 5.7 spinbox • • vinaygopal  

      2
      0
      Votes
      2
      Posts
      401
      Views

      @vinaygopal you could customise your Spinbox and set your own TextInput, that one still has the selectByMouse, even if 5.15.8 https://doc.qt.io/qt-5/qtquickcontrols2-customize.html#customizing-spinbox https://doc.qt.io/qt-5/qml-qtquick-textinput.html#selectByMouse-prop
    • UNSOLVED How to draw a static graph like structure using canvas in QML?
      General and Desktop • qml qt 5.7 canvas • • vinaygopal  

      2
      0
      Votes
      2
      Posts
      157
      Views

      You will get better performance (and more help from Qt docs) if you use QQuickPaintedItem and draw this in C++.
    • UNSOLVED how to access properties in a delegate
      QML and Qt Quick • qml qt quick qt 5.7 delegate • • vinaygopal  

      4
      0
      Votes
      4
      Posts
      239
      Views

      @vinaygopal "what if i want to access the visibility or a property i have defined in the delegate?" There are multiple instances of your delegate, corresponding to the part of the model being displayed. Which instance do you want the property from? If it's a common property that is not specific to a single instance, then the same answer applies - factor it out to the table level and use it in the delegate. If it is a property specific to a delegate instance you are interested in, how do you specify which delegate? Does the data actually belong to the model? What is it that you are trying to achieve?
    • UNSOLVED Is a QT application able to use the Android Telecom Framework?
      Mobile and Embedded • android qt 5.7 android sdk telecom and net telephony • • John1093838  

      2
      0
      Votes
      2
      Posts
      206
      Views

      Hi, For highly specific platform API, you will have to write some platform specific code. Qt can't cover absolutely everything and it's not its goal. Android is a bit of a special case because of its use of Java. You should take a look at the QtAndroidExtras module and its examples. Note that this is really specific to Android and how it works. There are other extras modules for some often used platform specific stuff that you can take a look at in terms of how things can be done. Note that these modules have been deprecated for Qt 6 in favor of a different approach and integration in a more centralized way.
    • UNSOLVED How can I step into Qt's source code when debugging under Mac OS with Qt-creator
      General and Desktop • qt 5.7 debugging mac os 10.14.6 • • shashikumar  

      4
      0
      Votes
      4
      Posts
      259
      Views

      Hm, it should work then, no idea.
    • SOLVED "QSqlDatabase: QSQLITE driver not loaded" error in deploying a Qt-Android project using JNI with Android studio
      General and Desktop • android qt 5.7 sqlite java jni android studio • • morteza ali ahmadi  

      15
      0
      Votes
      15
      Posts
      887
      Views

      I can solve the problem. First, I created folder sqldrivers including libqsqlite.so in the app directory (e.x. /data/user/0/com.example.polarislib) and I set permission by chmod 777 to sqldrivers folder and libqsqlite.so file and finally I used the following code in my source where the connection to Sqlite is needed: QCoreApplication::addLibraryPath("/data/user/0/com.example.polarislib");
    • UNSOLVED How to connect to mysql server in ubuntu 16.04?.
      India • qt 5.7 qt 4.8 ubuntu 16.04 mysql driver mysql server • • Sivamani V  

      3
      0
      Votes
      3
      Posts
      1001
      Views

      @Sivamani-V said in How to connect to mysql server in ubuntu 16.04?.: QMYSQL Driver not loaded. Available drivers: QMYSQL QSQLITE QMYSQL3 This gets asked so many times, here & elsewhere. Googling for your message will bring up many hits. Under Linux/Ubuntu it's usually libmysqlclient or libqt5sql5-mysql or similar which is missing/has dependencies missing/wrong version.
    • UNSOLVED Restrict resize of a Widget.
      General and Desktop • qgraphicsview qgraphicsscene qt 5.7 qresizeevent resize event • • sayan275  

      6
      0
      Votes
      6
      Posts
      1484
      Views

      The idea is that you have your container widget getting resized and in its resize event, you change the size of the inner widgets with the ratio you want.
    • SOLVED Point Cloud Library: Sliced points to custom colors
      Mobile and Embedded • qt 5.7 vtk pcl • • sayan275  

      2
      0
      Votes
      2
      Posts
      570
      Views

      we can change the rgb values of each point in a cloud
    • SOLVED I have a problem text rendering with Qt 5.7(QML)
      General and Desktop • qml qt 5.7 qlabel text • • MintogoDeveloper  

      4
      0
      Votes
      4
      Posts
      1061
      Views

      I resolve it. I setted font of text as property of QML Text component. (Like font.family : parent.fontfamily) and on Qt 5.7's QML, there are no enough options to control font properties. so, I moved to C++ side and set a whole application font. QFont font = someClass.getLangFont(); //set property of font instance here // such as hinting policy, style etc. QApplication::setFont(font); now it looks very cleary... thank you..
    • SOLVED QKeyPress - Simulating key press
      General and Desktop • qt 5.7 qkeyevent • • sayan275  

      4
      0
      Votes
      4
      Posts
      1780
      Views

      @sayan275 Dear Sayan I think you may know the answer to my problem. I'm struggling to send a self-defined event from main.cpp to the ui->boardView in mainwindow.cpp, as the ui->boardView is only defined in mainwindow.cpp. Yet the eventfilter can only be installed on the ui->boardView. It seems you've done similar sth similar. Could you please tell me how to realize such feature? (there are also detailed code about this which I put on stackoverflow https://stackoverflow.com/questions/60424216/how-to-use-eventfilter-under-child-widget-to-catch-self-define-event)
    • SOLVED Key press event to choose list
      General and Desktop • qtcreator qt5.5 qt 5.7 qkeypressevent • • Kinesis  

      14
      0
      Votes
      14
      Posts
      2626
      Views

      My bad, I misread from where the signal came from.
    • SOLVED How to add scroll bar action
      General and Desktop • qt 5.7 scrolling qt5.8.0 scroll bar • • Kinesis  

      12
      0
      Votes
      12
      Posts
      3358
      Views

      Did you try to determine why they don't appear ?
    • SOLVED Add textEdits on listWidget
      General and Desktop • qt5.5 qt 5.7 qt4 listwidget • • Kinesis  

      15
      0
      Votes
      15
      Posts
      4903
      Views

      @Devopia53 it works! , Thanks alot
    • SOLVED QtCreator compile returning stdlib.h: No such file or directory
      Mobile and Embedded • qtcreator qt 5.7 qt 5.7 and rpi3 • • GregWilsonLindberg  

      7
      0
      Votes
      7
      Posts
      8297
      Views

      @GregWilsonLindberg I think that the g++ version is what is doing it. The old version of rasbian is using g++ v4.9.2. The new version of rasbian is using g++ v6.3.0-18+. For the old compiler we had had to add an "INCLUDEPATH = /usr/include" line into the .pro file to get everything picked up properly. For the new compiler (and the change from #include to #include_next in cstdlib) that messes up. I'm removing the INCLUDEPATH, (which seems to have been included as -isystem instead of -I) and that is fixing the problem.
    • UNSOLVED Screen rotation - Beaglebone QT5/Eglfs
      Mobile and Embedded • qt5 qt 5.7 eglfs rotation beaglebone bbb • • m.esmaeelpour  

      1
      1
      Votes
      1
      Posts
      780
      Views

      No one has replied

    • UNSOLVED Dual display using QT on IMX6 Android platform.
      Mobile and Embedded • qt 5.7 embedded imx6 android 6 dual monitor • • Kiran  

      3
      0
      Votes
      3
      Posts
      1423
      Views

      I'll try out soon Samsung S8 plus Samsung DeX Samsung DeX is connected to a HD Monitor via HDMI and apps running on S8 are automatically running on this external monitor as soon as S8 is placed into the DeX dock. will my QtQuickControls2 APP run under this environment ? will the change of DPI and size work ? I'll let you know ...
    • UNSOLVED Can we use CSS on QPushButton
      General and Desktop • stylesheet qt 5.7 css • • Swapnil_Shelke  

      6
      0
      Votes
      6
      Posts
      7189
      Views

      @Swapnil_Shelke To create those kind of buttons you need more than CSS. You must go into button's paintEvent and then draw what you need (there are 3 simultaneous animation BTW) : #include <QtCore/qvariantanimation.h> #include <QtCore/qvariant.h> #include <QtWidgets/qabstractbutton.h> #include <QtWidgets/qapplication.h> #include <QtWidgets/qlayout.h> class Animation : public QVariantAnimation { Q_OBJECT public: Animation(QObject *parent = 0) :QVariantAnimation(parent) { setTargetWidget(qobject_cast<QWidget*>(parent)); setAutoUpdateEnable(true); } void setAutoUpdateEnable(bool a) { if (targetWidget()) { a ? QObject::connect(this, SIGNAL(valueChanged(QVariant)), targetWidget(), SLOT(update())) : QObject::disconnect(this, SIGNAL(valueChanged(QVariant)), targetWidget(), SLOT(update())); } } QWidget *targetWidget() const { return _target; } void setTargetWidget(QWidget *w) { _target = w; } QVariant value() const { return _value; } void setValue(const QVariant &variant) { if (_value == variant) return; _value = variant; } protected: void updateCurrentValue(const QVariant &value) override { setValue(value); } private: QVariant _value; QWidget *_target = nullptr; }; class SampleButton :public QAbstractButton { public: struct ButtonStyle { qreal border_radius = 4.0; QColor background_color = QColor("#f4511e"); QColor text_color = QColor("#ffffff"); int font_size = 28; QString font_family = "Arial"; int width = 200; int padding = 20; qreal hover_padding = 25; int duration = 600; QIcon icon = QIcon("next.png"); // http://www.flaticon.com/free-icon/double-angle-pointing-to-right_25358 @16x16 qreal pixmap_padding = 20; }; SampleButton(const QString &text, QWidget *parent = 0) :QAbstractButton(parent), _textEff(new Animation(this)), _pixmapEff0(new Animation(this)), _pixmapEff1(new Animation(this)) { setFont(QFont(_st.font_family, _st.font_size)); setText(text); } QSize sizeHint() const override { return QSize(_st.width, _st.padding + fontMetrics().height() + _st.padding); } protected: void paintEvent(QPaintEvent *) override { QPainter p(this); // draw background p.setPen(Qt::NoPen); p.setBrush(_st.background_color); p.setRenderHint(QPainter::Antialiasing, true); p.drawRoundedRect(rect(), _st.border_radius, _st.border_radius); p.setRenderHint(QPainter::Antialiasing, false); // draw text if (!text().isEmpty()) { p.setFont(font()); p.setPen(_st.text_color); p.setRenderHint(QPainter::TextAntialiasing, true); p.drawText(QRectF(rect().x() - _textEff->value().toReal(), rect().y(), rect().width(), rect().height()), Qt::AlignCenter, text()); p.setRenderHint(QPainter::TextAntialiasing, false); } // draw icon if (!_st.icon.isNull()) { p.setRenderHint(QPainter::SmoothPixmapTransform, true); auto s = _st.icon.availableSizes().at(0); p.setOpacity(_pixmapEff0->value().toReal()); p.drawPixmap(QPointF(rect().right() - (_st.pixmap_padding * 2) - _pixmapEff1->value().toReal(), rect().center().y() - s.width() / 4), _st.icon.pixmap(s)); } } void enterEvent(QEvent *e) { _textEff->setStartValue(0.0); _textEff->setEndValue(_st.hover_padding); _textEff->setDuration(_st.duration); _textEff->setEasingCurve(QEasingCurve::OutCubic); _textEff->start(); _pixmapEff0->setStartValue(0.0); _pixmapEff0->setEndValue(1.0); _pixmapEff0->setDuration(_st.duration); _pixmapEff0->setEasingCurve(_textEff->easingCurve()); _pixmapEff0->start(); _pixmapEff1->setStartValue(0.0); _pixmapEff1->setEndValue(_st.pixmap_padding); _pixmapEff1->setDuration(_st.duration); _pixmapEff1->setEasingCurve(_textEff->easingCurve()); _pixmapEff1->start(); QWidget::enterEvent(e); } void leaveEvent(QEvent *e) { _textEff->setStartValue(_st.hover_padding); _textEff->setEndValue(0.0); _textEff->setDuration(_st.duration); _textEff->start(); _pixmapEff0->setStartValue(1.0); _pixmapEff0->setEndValue(0.0); _pixmapEff0->setDuration(_st.duration); _pixmapEff0->start(); _pixmapEff1->setStartValue(_st.pixmap_padding); _pixmapEff1->setEndValue(0.0); _pixmapEff1->setDuration(_st.duration); _pixmapEff1->setEasingCurve(_textEff->easingCurve()); _pixmapEff1->start(); QWidget::leaveEvent(e); } private: ButtonStyle _st; Animation *_textEff = nullptr; Animation *_pixmapEff0 = nullptr; Animation *_pixmapEff1 = nullptr; }; int main(int argc, char *argv[]) { QApplication app(argc, argv); QWidget *dialog = new QWidget; dialog->setWindowFlags(Qt::FramelessWindowHint); QHBoxLayout _Layout; dialog->setLayout(&_Layout); SampleButton *sb = new SampleButton("Hover"); _Layout.addWidget(sb); dialog->show(); return app.exec(); } #include "main.moc"
    • SOLVED How to increase QTableWidgetItem SIZE
      General and Desktop • qtablewidget qt 5.7 qtablewidgetite • • Swapnil_Shelke  

      5
      0
      Votes
      5
      Posts
      3249
      Views

      @Swapnil_Shelke Happy to see that it helped you, You are welcome =)
    • UNSOLVED How Best to Prevent Focus Leaving a Widget?
      General and Desktop • qt 5.7 desktop • • GBWarren  

      5
      0
      Votes
      5
      Posts
      3346
      Views

      https://forum.qt.io/topic/114575/focus-transmission-rejecting
    • UNSOLVED writing to QTcpSocket does not always emit readyRead signal on opposite QTcpSocket
      General and Desktop • qt 5.7 qtcpsocket qtcpserver signals & slots signal&slot • • CybeX  

      3
      0
      Votes
      3
      Posts
      1808
      Views

      Isn't this the same issue as here https://forum.qt.io/topic/75821/qabstractsocket-unknownsocketerror-provides-errorstring-of-unknownerror?
    • SOLVED qopenglfunctions are not defined
      Mobile and Embedded • android qt 5.7 opengl es2.0 • • Ferni  

      2
      0
      Votes
      2
      Posts
      1682
      Views

      Ok... if I change the files gl2.h, gl2ext.h and gl2platform.h (from OGRE/RenderSystems/GLES2) for the ones that come with Android-NDK the error disappears.
    • UNSOLVED [POSSIBLE BUG] QT Console Application appears in Application Output panel instead of Console Window
      General and Desktop • qt 5.7 console console applica • • CybeX  

      5
      0
      Votes
      5
      Posts
      3725
      Views

      Really very help full. Thanks for sharing your precious experiences movements.
    • UNSOLVED reading and writing to QProcess in Qt Console Application
      General and Desktop • qtcreator qt 5.7 qprocess terminal • • CybeX  

      2
      0
      Votes
      2
      Posts
      4146
      Views

      @CybeX You already asked more or less the same question in another thread. In that another thread you was tolled to use the assynchronous API (there was even code for you). You should not try to do it in synchronous way, you are working against Qt. Use signals and slots. https://forum.qt.io/topic/75454/qprocess-readall-and-qprocess-readallstandardoutput-both-return-an-empty-string-after-qprocess-write-is-run/6
    • UNSOLVED qt - undefined reference to `vtable for myObj' in qt console application - signals and slots
      General and Desktop • qt 5.7 qobject class macro vtable • • CybeX  

      11
      0
      Votes
      11
      Posts
      6931
      Views

      @yuvaram If so, compile it with Network Download Example, which is officially available from Qt.
    • SOLVED QProcess::readAll and QProcess::readAllStandardOutput both return an empty string after QProcess::write() is run
      General and Desktop • qtcreator qt 5.7 qprocess readline stdio • • CybeX  

      15
      0
      Votes
      15
      Posts
      15041
      Views

      QProcess has quite extensive support for synchronous use. #include <QCoreApplication> #include <QDebug> #include <QProcess> int main(int argc, char **argv) { QCoreApplication app(argc, argv); QProcess process; process.start("ls", {"-l"}); if (process.waitForFinished()) { qDebug() << "returned:" << process.readAllStandardOutput(); } else { qDebug() << process.errorString(); } process.start("ls", {"-l"}); while (process.waitForReadyRead()) { while (process.canReadLine()) qDebug() << process.readLine().trimmed(); } }
    • UNSOLVED get original file name of resource in qrc file
      General and Desktop • qt 5.7 qfile resource qresource • • CybeX  

      3
      0
      Votes
      3
      Posts
      1612
      Views

      @Chris-Kawa It would actually just make things easier. I would like to generalize this procedure to e.g. QFile::copy(":/my/file", r.OriginalFileName); Here Qresource::OriginalFileName() returns the original file name e.g. somefile.txt Now, I am required to (for each file): QString newLocation = QString(tempdir + tempdir.seperator() + QString("myNewFileName.txt")); QFile::copy(":/my/file", newLocation); It just seems tedious and not very efficient. But thanks for clearing it up though, *grabs coffee
    • UNSOLVED QCameraExposure not possible to get or set attributes (Camera Example)
      General and Desktop • qt 5.7 qcamera • • TayMarthin  

      4
      0
      Votes
      4
      Posts
      1393
      Views

      I didn't wrote that there was any problem with your webcam, just that the backend used might not implement these parameters. You can check which backend is loaded by setting the "Q_DEBUG_PLUGINS" environment variable to 1 in the Run part of the Project panel in Qt Creator.
    • SOLVED QCheckBox not displaying checked state
      General and Desktop • qt 5.7 gui qcheckbox signals&slots • • CybeX  

      4
      0
      Votes
      4
      Posts
      4346
      Views

      Here is a possible solution for solving this "missing check/mark" issue. I implemented the CSS "indicator" solution I got from this qt form post which is problematic. Sources of solution: Doc page: here Implementation: here QPalette p = ui->checkBox->palette(); p.setColor(QPalette::Active, QPalette::Base, QColor(255, 255, 255)); p.setColor(QPalette::Button, QColor(255, 255, 255)); ui->checkBox->setAutoFillBackground(true); ui->checkBox->setPalette(p); QColor(255, 255, 255) refers to your desired background color, possibly the same color as your window background, etc. QPallete::Active, QPalette::base refers to the active checkbox's background (the white box background) QPalette::Button refers to the "actual background" (behind the checkbox and the checkbox text) Hope this helps!
    • UNSOLVED Is there a way to install WebEngineWidgets as dev depency in Ubuntu 14.04?
      QtWebEngine • qt 5.7 ubuntu 14.04 webengine dependencies • • Namox9001  

      9
      0
      Votes
      9
      Posts
      7588
      Views

      @mit_cruze Unless I missed something, it's highly unlikely that building Qt 5.12.0 with the options you passed ended in installing it in /usr/local/Qt-5.7.1.
    • SOLVED Virtual keyboard does not show up in QWidgets app on RPi 2
      Mobile and Embedded • qt 5.7 qtwidgets virtualkeyboard cross-compile eglfs rpi2 • • mr_max  

      10
      1
      Votes
      10
      Posts
      6701
      Views

      @mr_max is it working for you? I have the same problem.
    • SOLVED [Solucionado] Failed to create D3D shaders al actualizar controlador
      Spanish • opengl qt 5.7 directx • • JScars  

      1
      0
      Votes
      1
      Posts
      860
      Views

      No one has replied

    • UNSOLVED A weird bug? Why is there no spatial depth in my 3D scene?
      General and Desktop • qt3d qt 5.7 • • Finn  

      29
      1
      Votes
      29
      Posts
      9407
      Views

      For further reference this issue seems solved as described in this post.
    • UNSOLVED Android deployment with Ministro
      Mobile and Embedded • android qt 5.7 deploying ministro • • KroMignon  

      21
      0
      Votes
      21
      Posts
      6935
      Views

      @raven-worx : I've got an answer from BogDan Vatra, in fact Ministro does not support Qt 5.7.x This is why nothing works when generating APK with Ministro. Qt5.7.x support will be added some time later. This is a bad news for me... I can't wait for a Ministro update. So I found a workaround, I give it here, perhaps this could help someone else. I have create a APK with Qt lib included, in release mode but not signed. From this APK, which is in fact a ZIP archive, I've extract all Qt specific stuff: assets/--Added-by-androiddeployqt--/* lib/armeabi-v7a/libplugins_* lib/armeabi-v7a/libqml_* lib/armeabi-v7a/libQt5* lib/armeabi-v7a/libgnustl_shared I copy those files on device, into internal storage. Then, I generate new APK (same configuration: release, with Qt libs and not signed). To generate the update APK, I remove from this the Qt specific stuff (so APK size is now less than 2MB). I transfer this APK on device, on device side I insert missed Qt libs into. Then I start APK installation on device. This a very dirty way to do it, but it WorksForMe(TM)
    • SOLVED Wrong OS style/theme?
      General and Desktop • qt 5.7 linux mint qt creator 4.1 • • archer96  

      6
      0
      Votes
      6
      Posts
      2252
      Views

      You'll love KDE. It has always been one of my favorites. Plus the close integration with Qt makes it even better. I've used gnome a lot lately too though. A lot of people hated the new Gnome 3 changes, but I didn't mind them. It's not as full featured or nice as KDE though. But sometimes KDE acts a little weird due to some of the opengl stuff. And if all else fails, you can try arch. It isn't an easy to set up distribution but it's cutting edge. So everything is the newest of the new. Makes for a lot cooler of a linux experience in my opinion. :) Setup is not for the faint of heart though. There's no GUI, and I usually use a linux boot disk to get it going (one from sysreccd).
    • SOLVED QSqlQuery Access violation by out of scope
      General and Desktop • sql qt 5.7 mysql qsqlquery • • masterofeye  

      17
      0
      Votes
      17
      Posts
      5598
      Views

      @SGaist is VS express not excotic enough ? ;)
    • SOLVED Move QML ListView via buttons
      QML and Qt Quick • qml listview qt 5.7 quick • • Julien B  

      7
      0
      Votes
      7
      Posts
      7874
      Views

      Thanks @jpnurmi, This is exactly what i was looking for, all my issues are solved.
    • UNSOLVED Ingénieur Développement C++/QML - Toulouse - France
      Jobs • qtcreator qt 5.7 job france qlm • • DATUS SUD-OUEST  

      1
      0
      Votes
      1
      Posts
      1107
      Views

      No one has replied

    • UNSOLVED MSVC2015 not responding when opening Qt Designer
      Installation and Deployment • qt 5.7 windows 10 qt designer msvc2015 • • ekn0x  

      2
      0
      Votes
      2
      Posts
      1123
      Views

      i have a same problem, and have not solve yet