Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.3k Posts
  • Boost::thread and Qt UI Thread

    Unsolved
    3
    0 Votes
    3 Posts
    2k Views
    Chris KawaC
    @artwaw That's absolutely not going to work. Widgets shouldn't be moved to other threads. All ui code needs to run in the main thread. @inforathinam Qt's signal/slot connections do (by default) a runtime check at the time of signal emission. If both sender and the receiver live in the same thread then a direct connection is performed i.e. the slot is invoked in the same thread as the signal was emitted in (it's more or less equivalent to a direct function call). In your case that is exactly what's happening since sender and receiver are the same object (MainView). What you want though is to make a queued connection i.e. the slot to be invoked in the main thread, no matter which thread emitted the signal. Since your object is both sender and receiver Qt can't make that deduction automatically, so you need to help it with an extra argument to the connect() call: connect(mainViewInstance, &MainView::signal, mainViewInstance, &MainView::threadEnded, Qt::QueuedConnection); This way the slot will be called in the receiver's thread (I'm assuming MainView instance is a QObject that was created in the main thread).
  • QT OCI - Connect as SYSDBA

    Unsolved
    1
    0 Votes
    1 Posts
    314 Views
    No one has replied
  • Qt Creator Form Designer: how to remove leftover widgets?

    Unsolved
    2
    0 Votes
    2 Posts
    1k Views
    K
    @QtBit44 not sure if I understand you correctly. But you should be basically able to click on to any wiget in your layout and open a dialog with the right mouse key. There you will find delete. You be able to mark also any widget in the right upper pane and use the delete button. [update: also there you have to use the right mouse button and select delete]
  • [SOLVED]error: QWebView: No such file or directory

    5
    0 Votes
    5 Posts
    8k Views
    K
    @IslamMohamed Hi and welcome to devnet forum It is better fro you to start with a new post rather than steeling an old one. Concerning your question you can check out the QWebView example it gives you already a compilable and runnable example. Typically the example are the best start into new topics with Qt.
  • template class that inherits from QObject

    Solved
    4
    0 Votes
    4 Posts
    7k Views
    canellasC
    Thanks all for your contribution
  • How to receive a string from python and read on Qlabel ?

    Solved qt5 python socket tcpserver
    11
    0 Votes
    11 Posts
    5k Views
    T
    @jsulm thanks for you reply! it is work! thanks again!
  • Qfile and Qresource problem

    Unsolved
    3
    0 Votes
    3 Posts
    733 Views
    B
    @VRonin said in Qfile and Qresource problem: Did you add Dictionary2.csv.txt to the qrc file? Nope, did so now, thank you.
  • Static Object Definition From QML

    Unsolved
    3
    0 Votes
    3 Posts
    6k Views
    carles.sole.grauC
    @Wieland Hi, in relation with this answer I would like to replace the import "." with something like import MyComponents 1.0 I've found this documentation: http://doc.qt.io/qt-5/qtqml-modules-qmldir.html Where it's said: //Style.qml with custom singleton type definition pragma Singleton import QtQuick 2.0 QtObject { property int textSize: 20 property color textColor: "green" } // qmldir declaring the singleton type module CustomStyles singleton Style 1.0 Style.qml // singleton type in use import QtQuick 2.0 import CustomStyles 1.0 Text { font.pixelSize: Style.textSize color: Style.textColor text: "Hello World" } So in my case I did: //EnumerationCustomType.qml with custom singleton type definition pragma Singleton import QtQuick 2.7 QtObject { readonly property int one: 1 readonly property int two: 2 readonly property int three: 3 } // qmldir declaring the singleton type module MyComponents singleton EnumerationCustomType 1.0 EnumerationCustomType.qml // singleton type in use import QtQuick 2.7 import QtQuick.Controls 2.0 import MyComponents 1.0 ApplicationWindow { visible: true width: 640 height: 480 Column { Text { text: EnumerationCustomType.one } Text { text: EnumerationCustomType.two } Text { text: EnumerationCustomType.three } } } But when I try to run the app it is said: qrc:/main.qml:3 module "MyComponents" is not installed So, do you know how to solve this? I'm doing anything in a bad way? Thank you very much
  • QCamera won't transition to ActiveStatus

    Unsolved
    6
    0 Votes
    6 Posts
    2k Views
    C
    @SGaist We have other programs that function with the camera using different environment setups. Specifically the camera was coupled with a DMA based wrapper for direct display, however that uses a QML based application and is not compatible with QWidgets by all appearances. Hoping to get around that by using QCamera
  • Weird behavior of QList<T>

    Unsolved
    22
    0 Votes
    22 Posts
    7k Views
    Taz742T
    @advtaco The problem was qDebug () or foreach (const kRoom & singleRoom, building-> rooms) ?
  • Data Format issue

    Unsolved
    13
    0 Votes
    13 Posts
    4k Views
    jsulmJ
    @vidisha Well, you could read documentation: http://doc.qt.io/qt-5/qbytearray.html#fromHex
  • Error while building the OCI Plugin in widows 7

    3
    0 Votes
    3 Posts
    1k Views
    R
    This person has the same problem as I do. Is getting the same errors. My question is posted here: https://forum.qt.io/topic/80928/problem-building-oci-plugin-for-qt-5-9-1/10
  • What is QMatirx::inverted is being used in QGraphicsView

    Unsolved
    11
    0 Votes
    11 Posts
    3k Views
    kshegunovK
    @Qt-Enthusiast said in What is QMatirx::inverted is being used in QGraphicsView: I am not sure why in which case mapToScence returns 0 -1 -1 0 You have plenty of information in this thread, so you need to read up on the math and understand it; only then start to write down code. The "throw it against the wall and see what sticks" method will bring you only so far ...
  • Server programming best practises

    Solved
    6
    0 Votes
    6 Posts
    2k Views
    kshegunovK
    @VRonin said in Server programming best practises: Yeah, probably the friends part is not trivial as you'd need a web server rather than a web client Ooops, sorry, I was thinking about client side. You're right, it's going to be more involved for the server side ...
  • How to properly open a project from a different version of qt

    Unsolved
    2
    1 Votes
    2 Posts
    886 Views
    U
    @jonasqt said in How to properly open a project from a different version of qt: Warning: This file is not a part of any project. Does it compile? What do you know about this project? After googling your warning I found: http://doc.qt.io/qtcreator/creator-clang-codemodel.html
  • QObject EventLoop

    Unsolved
    5
    0 Votes
    5 Posts
    2k Views
    kshegunovK
    @VRonin said in QObject EventLoop: I always tought it was at time of connect() call If memory serves me, it is in QMetaObject::activate, which is the root point for all meta calls.
  • Creating an application using XCB

    Solved
    10
    0 Votes
    10 Posts
    4k Views
    K-StrK
    Hello to all, thanks a lot for your hints. sneubert recommended to use the following command to run it: ./applicationName --platform linuxfb:fb=/dev/fb1 This works fine. Thanks. Kurt
  • In windows 7, Use QSettings visit registory,Some Keys and Values do not show.

    Solved
    3
    0 Votes
    3 Posts
    612 Views
    F
    @tomma ,Thank you very much . yes, you are right. I find the problem immediately when I posted it.
  • 0 Votes
    22 Posts
    12k Views
    V
    I am checking the stored procedure's return value in my qt application.....
  • How can I control the InputMethod alternative words position on a custom widget.

    Unsolved
    5
    0 Votes
    5 Posts
    1k Views
    fasixF
    @jsulm thank you all the same.