Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • Problem with QMetaMethod::returnType with typedef type

    Solved qmetaobject invokemethod qmetatype
    2
    0 Votes
    2 Posts
    505 Views
    J
    @Jammin44fm It seems the solution was to use; qRegisterMetaType<JSValue>("JSValue"); Earlier in the code to register JSValue as a meta Type. I had already tried this, but was missing the string "JSValue" from the call. So it seems that both the type and the string are required. All good working now, Hopefully it will all work in 6.5 too, as it seems Qt has removed the string variant from the SDK.
  • qrc:/mainQml.qml:4:1: module "QmlApp" is not installed

    Unsolved
    9
    0 Votes
    9 Posts
    2k Views
    JKSHJ
    Sorry for the delay. @Diego-Iastrubni said in qrc:/mainQml.qml:4:1: module "QmlApp" is not installed: my top level cmake contains: add_subdirectory(QmlApp) ... target_link_libraries(pass-simple PRIVATE ... QmlApp ... ) Link to QmlAppplugin instead of QmlApp Still the same error on runtime. I can also see the same error when I run from the command line - without QtCreator. I asked for the version of Qt that you're using, but didn't get an answer. Anyway, see https://www.qt.io/blog/whats-new-for-qml-modules-in-6.5 -- Use Qt 6.5, add qt_standard_project_setup(REQUIRES 6.5) to your top-level CMakeLists.txt and call engine.loadFromModule() instead of engine.load()
  • 0 Votes
    6 Posts
    484 Views
    F
    @JonB Looks like I'm rewriting the whole class
  • QObjectPicker works on Linux, does not work on Windows

    Unsolved
    3
    0 Votes
    3 Posts
    225 Views
    SGaistS
    Hi, Which version of Qt are you using ? Can you provide a minimal compilable example that reproduces your issue ?
  • 0 Votes
    2 Posts
    692 Views
    JonBJ
    @arame Search this forum for many identical posts. Set environment variable QT_DEBUG_PLUGINS to value 1, run your script, see end of diagnostic output.
  • Need to setPen to color located in stylesheet

    Locked Unsolved
    2
    0 Votes
    2 Posts
    140 Views
    JonBJ
    @fontcolorhelp Please don't duplicate your post, https://forum.qt.io/topic/146460/changing-font-color-to-font-declared-in-stylesheet-on-drawtext-in-a-paintevent-of-a-qtreeview-class, especially once people have begun to reply. Other than you have changed the title here, how does it help you or anyone who responds to have two identical threads going?
  • QHttpMultiPart not setting headers correctly

    Solved
    2
    0 Votes
    2 Posts
    145 Views
    C
    It seems like I needed to manually add: QByteArray boundary = bookCover->boundary(); request.setHeader(QNetworkRequest::ContentTypeHeader, "multipart/form-data; boundary=" + boundary); Now
  • How to use Enum as QProperty + StyleSheet?

    Unsolved
    5
    1 Votes
    5 Posts
    382 Views
    R
    @Daniella I added Q_ENUM(Orientation) but it still 19
  • Optimal approach - read-only parsing of QSqlQuery from multiple threads

    Unsolved
    3
    0 Votes
    3 Posts
    298 Views
    J
    @JonB Awesome, thank you very much. In response to your points: I have timed the current single threaded approach, and I'm looking at implementing the multi-threaded approach as a means of benchmarking the two approaches. As it stands, the worst case scenario would require parsing the SQL results hundreds of times, so I expect there will be a crossover point whereby moving from single- to multi-threaded execution makes sense. This is an aspect I haven't really spent much time on as of yet, but I'll certainly look into it. I haven't set the QSqlQuery to forward-only, thank you for the recommendation!
  • Dockable widget gone AWOL

    Unsolved
    16
    0 Votes
    16 Posts
    992 Views
    PerdrixP
    @Chris-Kawa How can I programmatically display that menu for app windows? Found it QMainWindow::createPopupMenu()
  • Something wrong with Qt Online Installer (Download Speed)

    Solved
    3
    0 Votes
    3 Posts
    364 Views
    Ketan__Patel__0011K
    @moryaden Thank you so much for this solution.
  • QSocketNotifier with Win32 NamedPipes

    Unsolved
    9
    0 Votes
    9 Posts
    818 Views
    K
    @Clemens-Wasser sorry? You need to use the QWinEventNotifier in the ReadFile, WriteFile, and ConnectToPipe functions, just fill the OVERLAPPED.hEvent field with the CreateEvent. OR, you can copy/paste the private QWinOverlappedIONotifier which was deprecated a while time ago to watch an events directly on a HANDLE. See, e.g.sources of the QSerialPort, as I remember, as an example.
  • QSqlTable-/QSqlQueryModel with QTableView is very slow

    Unsolved
    8
    0 Votes
    8 Posts
    901 Views
    SGaistS
    @Andy314 the Qt models are indeed not optimized for very slow database connections so building your own model is a good plan. That said, accessing a database directly over internet is usually a pretty bad idea security wise even if the connection is in encrypted.
  • Qt 5.15.2 and Debian 12

    Solved
    3
    0 Votes
    3 Posts
    363 Views
    mrdebugM
    Solved by dowonload, compile and install openssl-1.1.1.
  • how to access the new object

    Solved
    12
    0 Votes
    12 Posts
    713 Views
    R
    @ChrisW67 finally, I find that use for loop would be same. for(int i=0;i<25;i++) { ui->pLayout->setRowStretch(i,25); }
  • Qt Web Engine Module for Qt 5.12.2

    Unsolved
    4
    0 Votes
    4 Posts
    775 Views
    V
    @dearqt The webEngine moudle only have header and source files. It does not have the library files. So, you need to compile that on your own. Go to that directory and run the command window, there you should compile the library. Once compiled, it generates the library Qt5WebView.dll and Qt5WebView.a
  • Create screen shot using Qt for ARM platform

    Unsolved
    5
    0 Votes
    5 Posts
    302 Views
    jsulmJ
    @vagesh Could be related to https://bugreports.qt.io/browse/QTBUG-76983
  • HID

    Unsolved
    4
    0 Votes
    4 Posts
    352 Views
    C
    @KAVAN said in HID: HID Board STM32 As with any USB HID client device, plug it in. Your operating system will recognise it as a keyboard, mouse or other human interface device. A Qt (or any other) program will react to the keyboard and mouse inputs.
  • Convert serial data with QSerialPort

    Unsolved
    4
    0 Votes
    4 Posts
    321 Views
    jsulmJ
    @arcy If you use Qt on both sides you can use https://doc.qt.io/qt-6/qdatastream.html
  • Include code from GitHub in Qt project

    Solved
    10
    0 Votes
    10 Posts
    971 Views
    jsulmJ
    @Qtpp said in Include code from GitHub in Qt project: but it failed This does not help to understand and solve the problem. You should provide more details...