Navigation

    Qt Forum

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

    • UNSOLVED 2D array into graphicview to create Objects from 2D-Array
      Game Development • array graphics view algorithms • • projectbavaria  

      14
      0
      Votes
      14
      Posts
      328
      Views

      @SGaist okey i will try
    • SOLVED Qml JS Array callBackFn
      QML and Qt Quick • qml javascript array qml + js foreach • • Konstantin Schraubek  

      4
      0
      Votes
      4
      Posts
      111
      Views

      Thanks guys! Im on Qt 5.10, that explains why the "=>" is not working. Had not known about the old style syntax. Settings this to closed.
    • UNSOLVED create listView with certain items from array
      General and Desktop • listview model array modeldata • • Ldweller  

      1
      0
      Votes
      1
      Posts
      227
      Views

      No one has replied

    • UNSOLVED How pass an array from qml to opengl Shader
      QML and Qt Quick • qml opengl array gsl • • simkat82  

      1
      0
      Votes
      1
      Posts
      297
      Views

      No one has replied

    • SOLVED How to add one parameter to the clicked SIGNAL?
      General and Desktop • signal & slot signal slots array event-handling • • ChristianMontero  

      17
      0
      Votes
      17
      Posts
      12856
      Views

      @ambershark said in How to add one parameter to the clicked SIGNAL?: @aha_1980 That sure does do what he needs, lol. I didn't know about QSignalMapper.. It's funny that even after 16+ years of Qt there's still classes I don't know about. :) I only knew it because I had the same requirement as @ChristianMontero some time ago :)
    • UNSOLVED How to split Array
      General and Desktop • c++11 websocket array string integers • • A Former User  

      6
      0
      Votes
      6
      Posts
      2793
      Views

      @Geeva The easies way is to move your task into its own function that expects q QList<QString> as an argument: void myClass::myFunction(QList<QString> startvalue){ //do stuff eg: qDebug() << "Value Received from server :" << startvalue; QStringList first = startvalue.split("|"); int firstSize = first.size(); qDebug() << "size :" << firstSize; if(firstSize == 5){ first1 = first[2]; first2 = first[3]; }..........(continue) } then you call that function for each and every item in your QList<QList<QString>> QList<QList<QString> > myList for(QList<QString> ls : myList){ myFunction(ls); }
    • SOLVED Array not sent from signal and slot
      General and Desktop • qtcreator signal & slot array send • • Lasith  

      3
      0
      Votes
      3
      Posts
      1528
      Views

      @Lasith Hi old type c array can also work. Its just a matter of what is registered already. You can register your own types. http://doc.qt.io/qt-5/qmetatype.html#Q_DECLARE_METATYPE
    • UNSOLVED Getting contents of qtablewidget cell to qstring array removing commas(splitting)
      General and Desktop • c++ qtcreator array split • • Lasith  

      3
      0
      Votes
      3
      Posts
      934
      Views

      @J.Hilk Thanx alot
    • SOLVED error in print value of const *char in data in Qt?
      C++ Gurus • qdebug array memcpy const char • • stackprogramer  

      7
      0
      Votes
      7
      Posts
      3311
      Views

      @VRonin i before write my code to this method 369 book: void WeatherBalloon::sendDatagram() { QByteArray datagram; QDataStream out(&datagram, QIODevice::WriteOnly); out.setVersion(QDataStream::Qt_4_3); out << QDateTime::currentDateTime() << temperature() << humidity() << altitude(); udpSocket.writeDatagram(datagram, QHostAddress::LocalHost, 5824); } But we want to connect UDP processing data to GUI app, it can not read QDataStream Method and it Crashs. The app is written in C#,So we should try a method that work with VisualStudio. Agian Than kyou for attention best regards stackprogramer
    • UNSOLVED Arrays and structures in QML
      General and Desktop • array structure array of struct • • Alper  

      15
      0
      Votes
      15
      Posts
      16965
      Views

      Hi @Alper, Here is what works. Use ScrollView instead of Flickable for scrollbars. Then as per this we need to explicitly set the contentItem as this newly created component. A very minimal example: import QtQuick 2.6 import QtQuick.Controls 1.4 Item { id: root width: 200 height: 200 ScrollView { id: scroll anchors.fill: parent } Button { text: "Load" onClicked: { var component = Qt.createComponent("Dummy.qml"); var obj = component.createObject(scroll); scroll.contentItem = obj } } } //Dummy.qml import QtQuick 2.6 Image { id: image; source: "http://placehold.it/650x650&text=\"Qt\"" }
    • UNSOLVED QDBusArgument array extraction
      General and Desktop • dbus array • • Mark81  

      4
      0
      Votes
      4
      Posts
      2249
      Views

      @Mark81 I'm certainly not a D-Bus guru, my experience with it is somewhat limited. That said, I think QDBusReply::value can be used, provided you have registered your types. Kind regards.
    • UNSOLVED QML var (array type) property initialization with QML objects
      QML and Qt Quick • qml javascript array initialization • • Aaro  

      1
      0
      Votes
      1
      Posts
      1221
      Views

      No one has replied

    • UNSOLVED Create arrays of widgets dynamically at runtime with the purpose of adding them to the window
      QML and Qt Quick • widgets array runtime dynamic gui • • AthanD  

      6
      0
      Votes
      6
      Posts
      3879
      Views

      @AthanD actually IMO i believe the grid layout is the most complicated one offered by Qt :) All the others are pretty much straight forward. But since you anyway want to display them in a grid it's your way to go ;)
    • Strange binding behavior when using binding on array's element
      QML and Qt Quick • qml binding array • • geniuss  

      11
      0
      Votes
      11
      Posts
      3941
      Views

      @p3c0 I tried but that didn't work. Folks on Stack Overflow don't know either. I got no other choice : https://bugreports.qt.io/browse/QTBUG-47407
    • [SOLVED]How to store data present in the tableview in any 2D array ?
      General and Desktop • qtableview array data • • Ratzz  

      9
      0
      Votes
      9
      Posts
      2335
      Views

      @SGaist Yes, It worked me out.
    • [SOLVED]Unexpected behaviour with int x[i] where 'i' is not known at compile time.
      C++ Gurus • array compilers non-qt dynamic allocat • • ealione  

      5
      0
      Votes
      5
      Posts
      1501
      Views

      @ealione The good thing is that typically users do not notice. The problem is popping up when trying to compile with older compilers or you remember that such stuff was not possible in the past. As @mcosta suggests there is probably a recommendation out. On the other compiler versions are changing too rapidly and also the versions of recommendations.