Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • Is there a way to import my unity3d model as a qt widget?

    Unsolved
    1
    0 Votes
    1 Posts
    124 Views
    No one has replied
  • QImage to byte array doesn't work

    Unsolved qimage image bytearray epd esp8266
    5
    0 Votes
    5 Posts
    2k Views
    B
    QImage::save() doesn't get the raw bytes of the image, it converts the image to a file format. If you really want the raw bytes, do something like QByteArray ba((const char *)preview.constBits(), preview.byteCount());
  • Qt Creator does not launch on Ubuntu 20.04.1 in VirtualBox

    Solved linux qtcreator ubuntu
    8
    0 Votes
    8 Posts
    6k Views
    aha_1980A
    Hi @TUStudi, just to add that this problem is tracked as QTCREATORBUG-24561.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    17 Views
    No one has replied
  • Bold and Regular fonts not loading simultaneously

    Unsolved
    3
    0 Votes
    3 Posts
    483 Views
    M
    Hi @SGaist , OS: Windows 10 Qt Version: Qt Creator 4.10.1 - Based on Qt 5.13.1 (MSVC 2017, 32 bit) Compiler: I am using mingw64 Instead of compilable example I am sharing detailed problem statement which may help us leading towards resolution: Problem Statement: I am using NotoSansSC font [OTF format] for ja-JP [Japanese] language, As mention below Font file: NotoSansJP-Regular.otf NotoSansJP-Black.otf NOTE: Above both the font belongs to the same font family NotoSansJP. While running the application I observed the below console log of the, MainApplication.cpp(275) -- strCurrentLanguageja-JP MainApplication.cpp(309) -- Installed font ID: 4 [NotoSansJP-Regular.otf] MainApplication.cpp(309) -- Installed font ID: 5 [NotoSansJP-Black.otf] Install Families styles: ("Black") MainApplication.cpp(325) -- Updated Default Font :Noto Sans JP Black installed font family------------> ("Noto Sans JP Black") Observation: It won't show installed font style to ("Regular", "Black") for NotoSansJP But if I load NotoSansJP-Regular.otf then it only shows Install Families styles: ("Regular") and installed font family------------> ("Noto Sans JP Regular") The same observation observed in zh-CN [Chiness] and ko-KR [Korean] language font file also. Question: Is there any way to explicitly tell Qt to treat the same font family and add it in style? Is this problem occurs due to .otf file? Can anyone please help me out with this problem? Let me know if any other information is required. Attachment 1 [NotoSansJP.PNG]: While I install the font in windows it treats as the same font family! [image: bb7f91cd-95ba-48ff-aaf2-a2fdaadd4687.PNG]
  • Could not find the Qt platform plugin "windows"

    Solved
    24
    0 Votes
    24 Posts
    9k Views
    D
    Reinstalling seems to have fixed the problem! Heck if i knew what was wrong! Can someone mark this issue as solved? EDIT: Sorry! I found out how to mark my thread as solved! Thanks again for the help!
  • What does "error: cycle in targets detected: \obj\_cuda.obj" mean??

    4
    0 Votes
    4 Posts
    1k Views
    R
    Accidentally got Error: cycle in targets detected: ui_.h after I add h-, cpp- and ui-files to project. Sometime after using context menu "Add Existing Files...." of the project backslash-space-backslash instead single backslash appended after added filename in the pro-file. Example: FORMS += \ gui/mainwindow.ui \ \ gui/newwindow.ui That '\ \' causes Error: cycle in targets detected.
  • Customization of the buttons

    Solved
    7
    0 Votes
    7 Posts
    490 Views
    mrjjM
    @Mikeeeeee Hi You can use an event filter on all Widgets you put into say a QFrame. Then no matter where you click you can catch it. You could also sublclass QFrame and add mousePress and emit signal. If none of the other widget you put in response to mouseclick they will go to parent.
  • QTest::fetchData(): "Test data requested, but no testdata available."

    Solved
    8
    0 Votes
    8 Posts
    4k Views
    S
    @Surendranath Ok i got the solution . And where i went wrong was i gave the wrong test case definition. So i correct it testNumbers_data() instead of test_case1(). Now problem solved. Thank you.
  • 0 Votes
    4 Posts
    928 Views
    sierdzioS
    Hm, it should work then, no idea.
  • Converting PyQt5 (Python) to Qt C++ QtWebSockets

    Unsolved
    9
    -1 Votes
    9 Posts
    2k Views
    K
    @eyllanesc i fixed it by adding QT += websockets to the .pro but im getting this now 00:00:44: Cannot retrieve debugging output.
  • Implementing bluetooth - general questions - part 3 - trace bluetooth inquiry in Qt

    Solved
    3
    0 Votes
    3 Posts
    263 Views
    A
    @Pablo-J-Rogina Thanks, I think this will do nicely and not only on bluetooth. Appreciate your post.
  • QTableView Fixing Some Columns

    Solved
    13
    1 Votes
    13 Posts
    931 Views
    SGaistS
    Great ! Since you have it working now, please mark the thread as solved using the "Topic Tools" button or the three dotted menu beside the answer you deem correct so that other forum users may know a solution has been found :-)
  • How to access the default border color

    Unsolved
    1
    0 Votes
    1 Posts
    288 Views
    No one has replied
  • Terminal Example - read problem

    Solved
    22
    0 Votes
    22 Posts
    3k Views
    B
    Ok so in my console application i am going to use code where you can select to filter \0 and \r. This option is checked in settings dialog (next to Local echo checkbox). Do you guys think that this code is OK or should i use some other option for filtering \0 and \r? void mainWindow::readData() { QByteArray data; data = serialPort->readAll(); if(settings->settings().filter_r == true) { data.replace('\r', ""); } if(settings->settings().filter_0 == true) { data.replace('\0', ""); } ui->console->putData(data); }
  • 0 Votes
    11 Posts
    2k Views
    T
    @SGaist as a matter of fact it did... Then I used Qthread::msleep(500); I will try using it asynchronously today and get back to you with the result...
  • No SQL driver available

    Solved
    6
    0 Votes
    6 Posts
    700 Views
    Pablo J. RoginaP
    @Please_Help_me_D said in No SQL driver available: and it worked! great, so please don't forget to mark you post as solved!
  • Adding flag to clang for detecting problems in code

    Unsolved
    1
    0 Votes
    1 Posts
    262 Views
    No one has replied
  • [Solved] Convert content of QlineEdite to Char *

    15
    0 Votes
    15 Posts
    8k Views
    SGaistS
    @Jc_Opc Hi, It's a question of object lifetime. In this case: const char * characters = ui->lineEdit->text().toLatin1().data(); the QByteArray returned by toLatin1 ends its life on the same line it was created. Therefore characters is pointing invalid memory as soon as the line ends. You have the exact same issue: toStdString().c_str(); The std::string returned by toStdString() ends its life the same way as the QByteArray above. qDebug() << myQString.toStdString().c_str(); works because everything happens on the same line.