Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • Can not set windows icon on wayland

    Unsolved
    2
    0 Votes
    2 Posts
    859 Views
    SGaistS
    Hi, Since you have 5.15.8, it means you have a commercial licence so you should contact the Qt Company about that matter.
  • how to use a static library?

    Solved
    7
    0 Votes
    7 Posts
    654 Views
    L
    Thanks so much for your help getting this far. After some googling I found an example I was able to follow to finally get it working. First, I changed my fortran to use the iso_c_binding. This lets you set the function name that you will call in the c++ program. subroutine fortfunc(ff) bind(c, name="fortfunc_bind") use, intrinsic :: iso_c_binding implicit none real*4 ff write(6,100) ff 100 format('ff=',f6.3) return end subroutine I got a different error, you have to also add the fortran library to the Qt project. In my case: win32:LIBS += -L"C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.4.311/windows/compiler/lib/ia32_win"
  • Build Qt with gRPC using cmake in Linux

    Unsolved
    4
    0 Votes
    4 Posts
    473 Views
    B
    But you didn't add that include dir to INCLUDEPATH and those libs to LIBS. BTW, since you said "using cmake", why are you still using .pro files (which usually means using qmake)?
  • QScxmlParser file not found

    Unsolved
    4
    0 Votes
    4 Posts
    343 Views
    Christian EhrlicherC
    QScxmlParser was renamed to QScxmlCompiler in Qt5.8
  • Debugger fails to start up with "ENGINE RUN FAILED"

    Unsolved
    1
    0 Votes
    1 Posts
    231 Views
    No one has replied
  • What application adds these "//!" symbols?

    Solved
    2
    0 Votes
    2 Posts
    383 Views
    Christian EhrlicherC
    This looks like a doxygen comment. It's added by the author of the code for doxygen, not by an application.
  • This topic is deleted!

    Unsolved
    17
    0 Votes
    17 Posts
    95 Views
  • This topic is deleted!

    Unsolved
    2
    0 Votes
    2 Posts
    4 Views
  • How set FilterRole base on customer data type's member.

    Solved
    2
    0 Votes
    2 Posts
    196 Views
    W
    I found a solution that set a data role based on 'userName'. whether have a better way avoiding set redundant data? pItem->setData(userData->at(i).getSNickName(), Qt::UserRole); ..... userDataProxyModel->setFilterRole(Qt::UserRole);
  • Is communicating with a std::jthread via a std::atomic<bool> flag set by slots safe?

    Solved
    3
    0 Votes
    3 Posts
    575 Views
    A
    @Christian-Ehrlicher: thank you for your help!
  • 0 Votes
    7 Posts
    2k Views
    M
    @jsulm Thank you for your kind and supportive replies.
  • bug of QMdiArea showing scrollbar ?

    Unsolved
    5
    0 Votes
    5 Posts
    624 Views
    Christian EhrlicherC
    Merged, will be fixed in Qt6.4.
  • Pixmap from QImage is broken

    Solved littlecms pixmap image image display
    15
    0 Votes
    15 Posts
    3k Views
    ademmlerA
    Here is the reason and solution. Thanks to Marti Maria - the author of littlecms - to sort this out ... This program does not work because you missed the part on https://littlecms.com/blog/2020/12/09/using-lcms2-on-qt/ that says: Alpha channels are supported as long as the image is not using premultiplied alpha. To get alpha channel make sure to include cmsFLAGS_COPY_ALPHA in the flags field. This is explained in LittleCMS documentation. So, try: toDisplay = colorManage(sourceImage, profiles, INTENT_PERCEPTUAL, cmsFLAGS_COPY_ALPHA);* This fixed the issue for me.
  • Missing to found QT creator on my host computer.

    Unsolved
    2
    0 Votes
    2 Posts
    378 Views
    Christian EhrlicherC
    What OS are you running? Either install Qt and QtcReator via the Qt online installer or use the distribution specific installer like e.g. apt to installer QtCreator. QtCreator is an IDE (which is built with Qt), Qt is a library which also ships some tools like e.g. QtAssistant/Designer/Linguist.
  • Menus Truncated initially on Windows (Qt 6.2)

    Unsolved
    5
    0 Votes
    5 Posts
    628 Views
    O
    I found a better fix which corrects the problem without reverting to the Windows 95 style. QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::Floor);
  • Deleting QTcpSocket cause app crash

    Unsolved qtcpsocket
    4
    0 Votes
    4 Posts
    1k Views
    KroMignonK
    @Dariusz said in Deleting QTcpSocket cause app crash: My MainA is a QSharedPointer<>, Here is the picture of log > I hope you have create it like this QSharedPointer<MainA>(new MainA(), &QObject::deleteLater); It looks to me like extraData can be invalid & cause the core crash? Given my complex thread logic... it may be a bit difficult to reproduce it. I do quite few of if (mSocketPtr) { QMetaObject::invokeMethod(this, [this]() { QMetaObject::invokeMethod(mSocketPtr, [this]() { mSocketPtr->setParent(this); }, Qt::QueuedConnection); }, Qt::QueuedConnection); } I do not understand this! If you want to change parent for a class instance, why do it so complicat? Setting parent can only be done if children and parent in same thread, but it muss not be done in the work thread! I would do it like this: if(mSocketPtr && mSocketPtr->parent() != this) { if(mSocketPtr->thread() != this->thread()) { QMetaObject::invokeMethod(mSocketPtr, [this]() { mSocketPtr->moveToThread(this->thread()); mSocketPtr->setParent(this); }); } else mSocketPtr->setParent(this); }
  • Cant get QCommandLineParser to ... parse

    Solved qcommandlinepar
    3
    0 Votes
    3 Posts
    452 Views
    Christian EhrlicherC
    See the documentation: "In addition, the valueName needs to be set if the option expects a value. "
  • Is it safe to emit a signal from another thread than the QObject?

    Solved
    12
    0 Votes
    12 Posts
    3k Views
    J.HilkJ
    @andyP its basically a collection of basic types :D the default copy operations should do just fine. Do I have to take some extra step regarding the enum class? I don't hink so
  • How to get QScrollerProperties from Qscrollbar class?

    Unsolved
    4
    0 Votes
    4 Posts
    405 Views
    C
    @IknowQT You gather the scroller associated with the QScrollbar QScroller* scroller = QScroller::scroller(this); then QScrollerProperties properties = QScroller::scroller(scroller)->scrollerProperties(); you gather/create a QScroller associated with the first QScroller. Did you mean this perhaps? QScroller* scroller = QScroller::scroller(this); QScrollerProperties properties = scroller->scrollerProperties();
  • Table header font shape is different between Windows OS and Raspberry Pi

    Unsolved
    11
    0 Votes
    11 Posts
    790 Views
    J.HilkJ
    @IknowQT first check what styles are available on your target OS qDebug() << QStyleFactory::keys(); than set it to "Windows" if available QApplication app(argc, argv); qDebug() << QStyleFactory::keys(); app.setStyle(QStyleFactory::create("Windows"));