Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.7k Topics 458.0k Posts
  • Calling QCoreApplication::processEvents from QtTest appears not to work

    Solved
    2
    0 Votes
    2 Posts
    474 Views
    V
    Yes - using QTEST_GUILESS_MAIN(TestLogging) rather than QTEST_APPLESS_MAIN does help to provide an event loop :-D
  • How to change the style of tree item drop.

    Unsolved
    1
    0 Votes
    1 Posts
    167 Views
    No one has replied
  • How to open 2 different window at same time on 2 different monitor?

    Unsolved
    6
    0 Votes
    6 Posts
    576 Views
    M
    @Qt-embedded-developer said in How to open 2 different window at same time on 2 different monitor?: will this code open first window in first monitor and second window on second monitor? That open nothing, that's your job :) Post here the print of my code above.
  • How to set different theme in the application created in QT.

    Unsolved
    5
    0 Votes
    5 Posts
    4k Views
    SGaistS
    @viraj1909 since it's your style you can apply the changes you want based on the rules you set. Hence, check if the label has text and only then apply your changes. You can also create dedicate styles that you apply only to certain widgets. In your case, maybe a QProxyStyle would be enough.
  • How to add external process window to mdiArea?

    Unsolved
    1
    0 Votes
    1 Posts
    163 Views
    No one has replied
  • Does anyone know of an existing, maintained Qt3D or QOpenGL scene graph?

    Unsolved
    7
    0 Votes
    7 Posts
    523 Views
    kshegunovK
    There's a QML designer, but I've not used it extensively to say how good it is. It is WYSIWYG, but probably some scripting/property binding will be needed as a post-step. However this all has nothing to do with 3D or Qt3D for that matter. The latter can be used directly from C++ and also in widgets-based projects. So it's completely orthogonal to the discussion about QML.
  • Edited source didnt get recognized

    Unsolved
    13
    0 Votes
    13 Posts
    975 Views
    SGaistS
    @Kattia that's why you don't do testing/debugging with static builds of large frameworks. Any change you make on it requires that you rebuild your application as well which is also time wasting beside requiring a large amount of space on your machine.
  • How to increase the y gap between two tree items in Abstract tree view.

    Solved
    3
    0 Votes
    3 Posts
    413 Views
    S
    @mpergand Thank you very much for the answer .
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    11 Views
    No one has replied
  • Problem with QThread

    Unsolved
    2
    0 Votes
    2 Posts
    213 Views
    Christian EhrlicherC
    @Stefanoxjx said in Problem with QThread: QMetaObject::invokeMethod(cd, "sltExecuteCopy", Qt::DirectConnection, Q_ARG(QString, srcDir), Q_ARG(QString, destDir)); What do you expect when you execute the function directly in the main thread? Where do you have this from? Please follow the official documentation and start the worker function with an appropriate signal (in the example it's a separate signal but QThread::started can be used here too).
  • Error while running HeartRate Server Example why doesn't able to figure It Out why ?

    Unsolved
    2
    0 Votes
    2 Posts
    268 Views
    JonBJ
    @GunaNeelamegam Might depend on your platform? At least try solution in Qt BLE advertising gives "advertising error", "HCI command disallowed". and QBluetooth BLE advertising does not work on ubuntu (BlueZ).
  • console application - no output

    Unsolved
    7
    0 Votes
    7 Posts
    646 Views
    Pl45m4P
    @AnneRanch So you want your Qt app to be able to handle any input like a terminal?! WHY?! it does not make any sense unless you really write your own terminal app. If you want to pass command line arguments to your program, check QCommandLineParser https://doc.qt.io/qt-6/qcommandlineparser.html
  • Trying to grab/render a pixmap from a Qt3DWindow

    Unsolved qt3dwindow pixmap
    9
    0 Votes
    9 Posts
    2k Views
    D
    Has any progress been made on this problem? I'm still encountering it. If it helps at all, I'm running on a Linux system with noVNC.
  • QTextEdit set row colour based

    Unsolved
    1
    0 Votes
    1 Posts
    181 Views
    No one has replied
  • How to use a QGraphicsItem in a Delegate?

    Solved qitemdelegate qgraphicswidget qtreeview
    8
    0 Votes
    8 Posts
    1k Views
    SGaistS
    @Jammin44fm the paint method of QGraphicsItem is public so you can call it yourself with the painter you use in the delegate.
  • Minior ethic "issue"

    Unsolved
    4
    0 Votes
    4 Posts
    329 Views
    A
    @Pl45m4 The title should have been "Minor ethic issue" minor as in irrelevant . This post was not about "how to set aliment " but since you brought it up here is the code result_name = Get_("hci0",result ,"hci0"); if(!result_name .contains(" FAILED ")) { **ui->lineEdit_10->setAlignment(Qt::AlignRight);** ui->lineEdit_10->setText(result_name ); ui->textEdit->append(result_name ); ui->textEdit_3->append(result_name ); } else { ui->textEdit_4->append(result_name); } ... and the result is still same - the text is LEFT ALIGNED... BUMMER I changed "build only changed files " and it does not ... I had to run "build" to get the "right align " to take...
  • setPointConfiguration does nothing

    Unsolved
    6
    0 Votes
    6 Posts
    549 Views
    N
    @JonB I should ask, is this an oversight or bug? Should turning on OpenGL de-activate certain features of QLineseries?
  • Stylesheet for the arrows on the QListView of a QCombobox

    Unsolved
    3
    0 Votes
    3 Posts
    679 Views
    C
    @jsulm Sorry, I'm just not seeing it. I'm already styling "QComboBox::down-arrow" and "CComboBox::drop-down" to make the combobox look like this. [image: fa9289d7-fe71-4646-8511-51178ad53796.png] For smaller lists, those arrows don't appear and it looks fine. I styled "QComboBox QAbstractItemView { " to set the padding, background color, selection color, item selection border for the itens on the ListView. The only things in the example I'm not using are the "on" and "editable" states. I'm not planning on allowing the user to edit the combobox and I don't want it to look different if it's on or not. To see if I could change the color of those arrow buttons to red, I literally tried styling something similar to the example below for every sub-control on the List of Sub-Controls in this link https://doc.qt.io/qt-6/stylesheet-reference.html#sub-line-sub, but nothing changed those two buttons. "CComboBox::down-arrow {" "background-color: red;" "}" "CComboBox::float-button {" "background-color: red;" "}" "CComboBox::indicator {" "background-color: red;" "}" ... I'm just looking for the name of these sub-controls or if they should be addressed as another class instead of a sub-control. I really would appreciate an example like the ones above that could turn those two arrows red or set an image or change them in any way.
  • How to correctly close the subroutine started by QProcess?

    Solved
    2
    0 Votes
    2 Posts
    281 Views
    aha_1980A
    @alexaatm That sounds like a horrible solution as this will block your event loop. Let me guess: you create the QProcess object on the stack and when the object goes out of scope, it is destroyed and therefore the executable is killed. The correct solution is to make the QProcess a member variable so it stays alive when the calling function exits. Instead the waitForXxxx functions you should use signals and slots to communicate with the process. Regards
  • Using OpenCV with QT 6 and CMake

    Unsolved
    13
    0 Votes
    13 Posts
    7k Views
    D
    This worked for me