Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • Arranging the grid layout in function

    Unsolved
    2
    0 Votes
    2 Posts
    457 Views
    kshegunovK
    Something along those lines: qint32 columns = 5; // Or whatever comes as an argument QList<QWidget *> itemsToInsert; QGridLayout * layout; for (qint32 i = 0, size = itemsToInsert.size(); i < size; i++) layout->addWidget(itemsToInsert[i], i / columns, i % columns);
  • QBluetooth: Slow BLE characteristics scan

    Unsolved
    1
    0 Votes
    1 Posts
    292 Views
    No one has replied
  • QOpenGL on Mac - QCocoaGLContext: Falling back to unshared context

    Solved
    3
    0 Votes
    3 Posts
    3k Views
    njbrownN
    You were right, it's just a warning @mrjj . I fixed the issue by setting the default surface format in the main function before the gui is created. QSurfaceFormat format; format.setDepthBufferSize(32); format.setMajorVersion(3); format.setMinorVersion(2); format.setProfile(QSurfaceFormat::CoreProfile); QSurfaceFormat::setDefaultFormat(format); Maybe this is needed so the UI and the QOpenGLWidget has the same version opengl contexts so they play nice. I'm not entirely sure what goes on the background.
  • Custom two different QTabWidgets with stylesheet

    Solved
    4
    0 Votes
    4 Posts
    730 Views
    SGaistS
    Hi and welcome to devnet, Use the tab-bar sub-control for that.
  • QScriptEngine: undefined reference to `recd::qInitResources_app()'

    Solved
    2
    0 Votes
    2 Posts
    923 Views
    M
    I've solved the problem: I've placed Q_INIT_RESOURCE in main and it compiled successfully.
  • Need help with QRegularExpression for strings and comments

    Solved
    14
    0 Votes
    14 Posts
    4k Views
    kshegunovK
    That's no problem of PHP (from it's point of view). If you look at the list of tokens you see that it doesn't care about any HTML, javascript or css. It just reads the stuff outside <?php and ?> and prints it to the standard stream (the T_INLINE_HTML token), it cares not what it contains. So for highlighting any one of those languages you will need another tokenizer that recognizes them.
  • Application crashing while being run on Debug, works on Release

    Solved
    6
    0 Votes
    6 Posts
    4k Views
    matthew.kuiashM
    @kshegunov Ah yes... History, "the old days". I still have address aliasing, near, far and huge pointers, ram bank switching, EMM, XMS and HIMEM burnt into my mind for all the wrong reasons...
  • QNetworkAccessManager - How to disable HELP command. (FTP)

    Solved
    7
    0 Votes
    7 Posts
    2k Views
    SGaistS
    You have to make them available to your customer. Note that every improvement you can provide will be appreciated and made available to all Qt users so it would be nice considering doing a submission.
  • Adding Serial Port Module with QT += serialport

    Unsolved qserialport 5.7 5.7.1
    4
    0 Votes
    4 Posts
    3k Views
    SGaistS
    How did you install Qt ?
  • How can I get a difference between two DateTime intervals in micro and nano seconds?

    Unsolved
    22
    0 Votes
    22 Posts
    10k Views
    SGaistS
    It depends on the source. You have all the explanations here.
  • 0 Votes
    5 Posts
    2k Views
    A
    @SGaist thank you SGaist for your kind replay honestly all the tense & anxiety & obsecurity is gone thanks to matthew & you i know now what to focus on & what's the matter with Qt Qt is uses RAW C++ codes & don't hide any mechanism from the user hence they required you to communicate with it in RAW format codes it's really helpful to talk with experts ^_^
  • Best way to create and store binary data

    Unsolved
    7
    0 Votes
    7 Posts
    3k Views
    kshegunovK
    @GregWilsonLindberg said in Best way to create and store binary data: I still don't know if the append(const char *. int) call will properly handle data with embedded null bytes. It will if you pass a valid size. @jsulm said in Best way to create and store binary data: append() interprets the pointer as a C string as far as I know, so zero bytes will be interpreted as end of string (not what you want). Only if you don't pass the size (i.e. cause it to deduce the size of the buffer). http://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/tools/qbytearray.cpp#n1922
  • Proper ask on close implementation

    Solved
    8
    0 Votes
    8 Posts
    2k Views
    kshegunovK
    @CBPeckles said in Proper ask on close implementation: I believe you forgot a box.show() at the end of the code Your belief is well founded, I did forgot it indeed.
  • libUSB on MaxOs Sierra LINKER Problem (can't map file, errno=22)

    Solved
    5
    0 Votes
    5 Posts
    1k Views
    B
    @jsulm Ah thank you. Good to know :) I solved the problem with installing the library with homebrew: brew install libusb And set the paths in the .PRO-file to: # Link LIBUSB library LIBS += -L/usr/local/Cellar/libusb/1.0.21/lib -lusb-1.0 # Path to LIBUSB library INCLUDEPATH += /usr/local/Cellar/libusb/1.0.21/include/libusb-1.0
  • 0 Votes
    7 Posts
    3k Views
    Kelvin RoyalK
    @kshegunov Alright. Now am ok! I understand QTcpSocket better. Thank you guys
  • Give me recomendations for use Qthread

    Solved
    22
    0 Votes
    22 Posts
    5k Views
    matthew.kuiashM
    @aurquiel No problem at all. If this is a solution to you problem please mark the reply as the correct answer and mark the thread as solved. Thank you!
  • QMenuBar, QAction - setVisible slot

    Solved
    8
    0 Votes
    8 Posts
    2k Views
    Romain CR
    @Chris-Kawa Hi Chris, I was coming back on that post, I do a small project on my side just to test this feature and setVisible behavior works fine. Perhaps we are filtering events, or missed something on the main project. I'm making an investigate about that, It confirm that is the right way to deal with. Thanks all, for your help! Romain
  • This topic is deleted!

    Solved
    5
    0 Votes
    5 Posts
    76 Views
  • Qpushbutton with little red circles indicating notifications

    Solved
    9
    0 Votes
    9 Posts
    5k Views
    mrjjM
    @Tejas-Virpariya Good work :) Can we see the final result ? ( use postimage.org , image upload is broken here)
  • Change Label text color not working

    Solved
    8
    0 Votes
    8 Posts
    5k Views
    O
    @J.Hilk Got it working with your code. jsulm's method didnot work in my code. Thanks to both of you.