Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • Qt Designer, layouts with setSpacing(0()); why?

    Solved
    12
    0 Votes
    12 Posts
    1k Views
    T
    Found out where they come from. Designer menu: form settings. edit: I had the layout function enabled and both fields set to zero. Instead of giving it a function name. Of course i don't even need (or understand) this functionality and should have left it alone. But this was many months ago when i first started with Qt. So today i found out i must think more before i click on something that seems harmless ;)
  • Singleton in QT. How?

    Solved
    3
    0 Votes
    3 Posts
    409 Views
    B
    @sierdzio Thx to you. Issue solved, example published.
  • How to catch MouseClick event on QWebEngineView?

    Unsolved
    2
    0 Votes
    2 Posts
    870 Views
    JonBJ
    @magseven Suggest you have a look at https://forum.qt.io/topic/54233/how-to-capture-mouse-events-in-webengineview. Also see https://bugreports.qt.io/browse/QTBUG-43602.
  • Could main thread catch exception threw by other thread

    Unsolved
    16
    0 Votes
    16 Posts
    6k Views
    Q
    @wrosecrans Thanks a lot for your answer. @JonB @kshegunov @JKSH And thanks for your discussion. I learnt a lot from that.
  • Linker problem with QtAV

    Unsolved
    10
    0 Votes
    10 Posts
    989 Views
    V
    Yes, at least the QtAV libraries are definitely built with the same compiler, because I also build them in QtCreator with the same toolchain. I found the solution here in QtAV discussion forum. According to the findings also from other people something has changed between Qt 5.11 and Qt 5.12, which breaks the functionality. Now my application compiles but crashes immediately because some other libraries are missing. With Qt 5.11 the 3rd party libraries (in my case TagLib and MediaInfo) are automatically copied to release directory, but this also doesn't work with Qt 5.12+ anymore. I can fix this easily by copying the DLLs to the folder manually. But I mention it, because I think the two problems might be related.
  • Building QFreeOpcUaPlugin and QOpen62541Plugin plugins Qt 5.10

    Unsolved
    14
    0 Votes
    14 Posts
    6k Views
    P
    @fmeerkoetter said in Building QFreeOpcUaPlugin and QOpen62541Plugin plugins Qt 5.10: @N3ff3 please have a look at this article: https://blog.basyskom.com/2018/want-to-give-qt-opcua-a-try/ https://cheapessaywriter.net/ You should go with the open62541 backend. Open62541 is the more complete implementation and has a much more active community. Note that open62541 will release their 0.3 version in the next few weeks. We plan to use this release in the Tech Preview in Qt 5.11. I read that open62541 is the most stable and feature complete open source backend presently in Qt OPC UA so you won't experience any difficulties.
  • How to use CComPtr CComQIPtr

    Unsolved
    3
    0 Votes
    3 Posts
    1k Views
    V
    Too much trouble. I don't need intelligent CComPtr and ComQIPtr. I'd better manage the pointer by hand. Thank you all the same.
  • Custom Process Steps and .pro.shared file not working

    Unsolved
    2
    0 Votes
    2 Posts
    202 Views
    aha_1980A
    Hi @landersohn, IIRC, you can only share editor settings etc., but not build related settings. Better put these extra steps in your .pro file, that even works outside Creator. Regards
  • How to create a QList<QGraphicsItem>

    Unsolved
    5
    0 Votes
    5 Posts
    413 Views
    S
    QList will call follow code to create object: template <typename T> Q_INLINE_TEMPLATE void QList<T>::node_construct(Node *n, const T &t) { if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) n->v = new T(t); else if (QTypeInfo<T>::isComplex) new (n) T(t); #if (defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__IBMCPP__)) && !defined(__OPTIMIZE__) // This violates pointer aliasing rules, but it is known to be safe (and silent) // in unoptimized GCC builds (-fno-strict-aliasing). The other compilers which // set the same define are assumed to be safe. else *reinterpret_cast<T*>(n) = t; #else // This is always safe, but penaltizes unoptimized builds a lot. else ::memcpy(n, static_cast<const void *>(&t), sizeof(T)); #endif } But QGraphicsItem is a abstract class, See, boundingRect(), paint(), that causes compilation to failed.
  • How can I find a QWidget that pops up and goes away very quickly?

    Unsolved
    3
    0 Votes
    3 Posts
    262 Views
    JoeCFDJ
    Check the places where timers may be used
  • Simple ActiveX - Class has no metaobject information

    Unsolved
    3
    0 Votes
    3 Posts
    762 Views
    hskoglundH
    Hi, that error typically occurs when there's no matching .tlb type library file, e.g. no simpleax.tlb file. The MinGW compiler manages to create *.idl files just fine with the idc.exe tool, but it has no midl.exe to create the .tlb file from the .idl file (yet). So for that last step, think you need MSVC :-(
  • QT application with OpenCV and multithreading dies, no errors given

    Unsolved
    1
    0 Votes
    1 Posts
    663 Views
    No one has replied
  • Qt Mac version doesn't have file libqsqlmysql.dylib

    Solved
    11
    0 Votes
    11 Posts
    3k Views
    Quang PhuQ
    Hi, @SGaist , Finally, it's done for me, but it takes time too much, I have look at many topics to find out solution for this. I think we should have a big topic to collect common issues + solution for each, it would reduce time for developer to search and supporter to answer. Thank you for your support. Between, I created a topic to give some instructions to create Mysql on Mac device at: https://forum.qt.io/topic/106565/mysql-qt-create-plugin-mysql-for-qt-on-mac, if you have time, please take a look at it, thanks.
  • QDiffuseSpecularMaterial diffuse texture

    Solved
    6
    0 Votes
    6 Posts
    958 Views
    K
    I eventually found this to work for me texture = new Qt3DRender::QTexture2D(); material = new Qt3DExtras::QDiffuseSpecularMaterial(); material->setAlphaBlendingEnabled(true); material->setAmbient(QColor(0xff,0xff,0xff,0x00)); // SymbolImage is my subclass of qabstracttexture img = new SymbolImage(name, material, blah, blah, blah, blah, blah); texture->addTextureImage(img); // the two textures are identical for my work material->setDiffuse(QVariant::fromValue(texture)); material->setSpecular(QVariant::fromValue(texture)); So just QVariant::fromValue(). Then later upon a callback: /// assume diffuse is same as specular, or use specular QTexture2D *t = material->diffuse().value<QTexture2D*>(); SymbolImage *s = static_cast<SymbolImage*>(t->textureImages().first()); That's what I ended up using.
  • QJsonDocument: Insert/update new QJsonObject

    Solved
    5
    0 Votes
    5 Posts
    4k Views
    VRoninV
    @fem_dev A file is nothing fancy it's just a container of a bunch of bytes. Files do not have "insert" functionalities. So no, it's not possible
  • 2D&3D animation designer by Qt

    Unsolved
    12
    0 Votes
    12 Posts
    1k Views
    mrjjM
    @hamed_ta I Since games are made with openGL im sure its fast enough but i agree using it directly is really lowlevel. I think if it was my project, i would first insert timing functions in all major function to get an idea where it uses all the time. Also if you do disk IO after each frame, that will also cost. So its hard to say what is the right thing to try with no data to look at telling if its just too slow overall or if one or more features could be tuned to provide more performance.
  • Confusion regarding QtWayland compositor

    Unsolved
    1
    0 Votes
    1 Posts
    145 Views
    No one has replied
  • SIGNAL argument

    Solved
    2
    0 Votes
    2 Posts
    287 Views
    ODБOïO
    i managed to solve this by myself // nIndex update handler static void nIndexUpdated(QOpcUa::NodeAttribute attr, const QVariant &value){ qDebug()<< "new value is " << value; } void uaSub(QScopedPointer<QOpcUaNode> &node, QString nodeId , void (*theUpdateHandler)(QOpcUa::NodeAttribute attr,const QVariant &value)){ node.reset(m_client->node(nodeId)); QObject::connect(node.data(),&QOpcUaNode::attributeUpdated,[=](QOpcUa::NodeAttribute attr,const QVariant &value){ theUpdateHandler(attr,value); }); } use uaSub(nIndexNode,"ns=4;s=MAIN.nIndex",nIndexUpdated);
  • RESTFul Server in qt

    Unsolved
    2
    0 Votes
    2 Posts
    191 Views
    raven-worxR
    @satyanarayana143 Cutelyst or if you can wait: https://www.qt.io/blog/2019/01/25/introducing-qt-http-server
  • Q3DSurface & QEntity

    Unsolved
    1
    0 Votes
    1 Posts
    169 Views
    No one has replied