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 it possible to fill color in bounding rectangle?

    Solved
    13
    0 Votes
    13 Posts
    2k Views
    Swati777999S
    @JKSH said in Is it possible to fill color in bounding rectangle?: @Swati777999 said in Is it possible to fill color in bounding rectangle?: I wanted to just fill colors to a textbox, so tried with this one. ... Is it possible to fill color to a textbox ? or just do as the above and then put a QLabel inside it? ... It's not a Qt class, in general how text-box is represented in [Untitled] By default Paint Application of Windows OS. I'm afraid I don't fully understand your descriptions or what you're trying to do. Can you please describe what you have already implemented, and what changes you want to make? If you just want to fill the background colour of a QLabel, you can apply a stylesheet to the label: https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qframe For example, label->setStyleSheet("background-color: red;"); Thanks. This works for me.
  • adding subwindow to MDI area

    Moved Solved
    7
    0 Votes
    7 Posts
    1k Views
    A
    @ChrisW67 Before I read the last reply , I did this . Works as required Form_SYSTEM *FS = new Form_SYSTEM(); mdiArea->addSubWindow(FS)-> setWindowState(Qt::WindowMinimized) ; //modify current / last addition mdiArea->currentSubWindow()->showNormal(); mdiArea->currentSubWindow()->resize(400,400); SOLVED
  • Statically linked executable requires dll

    Unsolved
    5
    0 Votes
    5 Posts
    1k Views
    C
    @Korsarq said in Statically linked executable requires dll: KERNEL32.DLL and MSVCRT.DLL Any Windows application will depend on the first (directly or indirectly): it is the Windows base API (along with USER32.dll, GDI32.dll etc.). Almost any Windows application with components built in C/C++ will depend on the Microsoft Visual C Run Time (MSVCRT): it is the C standard library. MinGW also uses this library. Both are part of Windows, not part of your application. I thought that those libraries are build statically, but it appears that's not the case. In the default Qt build those libraries (e.g. libQt6Widgets.a) are stubs that provide the linker with information to connect your application to the corresponding dynamic library at run time. If you build Qt statically (which you are not doing) then these libraries will contain the actual Qt executable code. Your linked application binary will include this code directly and grow substantially in size. These static Qt libraries will still have dependencies on dynamically loaded (shared) Windows components like KERNEL32.dll.
  • Bug: QSGTextureMaterial MirroredRepeat invalid.

    Unsolved
    2
    0 Votes
    2 Posts
    140 Views
    SGaistS
    Hi, Looks like there might be an error in these variable declaration. Did you already check the bug report system for something like it ?
  • Problems loading plugins

    Solved
    4
    0 Votes
    4 Posts
    299 Views
    D
    I got it. Just as a dumb test I copied the plugin from plugandpaint sample into plugindir of my app and that got loaded. This showed me that the loader failures had nothing to do with my programming, but that there was a problem with the plugin files. So I investigated further in that direction and found out that no link errors are output at building the plugins. So if you think everything is error free, that is far from true for the plugins. Was then still a tough piece of work, but in the meantime all plugins get loaded.
  • Qt 6.2.2 macOS 12.1 aarch64 - Unable to run OOTB BLE Heart Rate Server Example

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

    Unsolved
    2
    0 Votes
    2 Posts
    7 Views
  • How to modify Qt variable (QKmsOutput.mode) from application level?

    Unsolved
    1
    0 Votes
    1 Posts
    179 Views
    No one has replied
  • 0 Votes
    12 Posts
    2k Views
    AitorQtA
    Yeah, done!
  • Changing cursor in QTabBar

    Solved
    6
    0 Votes
    6 Posts
    643 Views
    M
    Hey, I solved this problem. This is my last code //maingui.h #include <QTabBar> ... private slots: ... void mouseMoveEvent(QMouseEvent *event); private: QList<QTabBar *> tabBar ; This is the CPP File //maingui.cpp MainGUI::MainGUI(QWidget *parent) : QDialog(parent, Qt::WindowTitleHint | Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint | Qt::WindowMaximizeButtonHint), ui(new Ui::MainGUI) { ui->setupUi(this); setMouseTracking(true); ... } void MainGUI::mouseMoveEvent(QMouseEvent *event){ tabBar = this->ui->tabWidget->findChildren<QTabBar *>(); tabBar.at(0)->setCursor(Qt::PointingHandCursor); } But sometimes its not initialize for the first time. Thank you
  • setAccessibleDescription() on tooltip window

    Unsolved
    4
    0 Votes
    4 Posts
    377 Views
    AndyBriceA
    Hi @SGaist I am on Qt 5.15.2 and testing on macOS 10 and 11. Just Press Cmd-f5 to enter voice over mode and hover over any QWidget with tooltip text (e.g. a QPushButton). It just says 'new window' when the tooltip window appears. This is not helpful for users. It should probably say nothing.
  • error " use of undeclared idetifier IO_ReadOnly ..."

    Moved Unsolved
    2
    0 Votes
    2 Posts
    190 Views
    JonBJ
    @AnneRanch If you look at the foot of the example page you quote you will see Copyright (c) 2002-2004 by Johan Thelin (e8johan -at- digitalfanatics.org). You must not use such an old example, it was written for Qt 3. Many things have changed since then. The newer constant for IO_ReadOnly is QIODevice::ReadOnly, which should make this compile, but I strongly suggest you simply ditch this example code as there may be other problems (e.g. I don't think your line.latin1() will work) or deprecated code.
  • Always select the first item in a QListView during a search

    Solved
    11
    0 Votes
    11 Posts
    888 Views
    M
    @Gabber said in Always select the first item in a QListView during a search: // add source Model mFungusProxyModel->setSourceModel(mFungusDataModel); mFungusFilterModel->setSourceModel(mFungusDataModel); Seems strange to me, but maybe i'm wrong - Model-View pattern gives me headache, too complicated for my little brain :) In one of my app, i'm using a sorting model and i do like this: historyModel=new HistoryModel(); historySortFilter= new HistorySortFilter(); historySortFilter->setSourceModel(historyModel); tableView->setModel(historySortFilter); As you can see, i first set the proxy model to the sorting model, then set the sorting model to the view. Hope this helps.
  • How to create a childwidget with other color as parent

    Unsolved
    6
    0 Votes
    6 Posts
    1k Views
    Pl45m4P
    @Lukas02 said in How to create a childwidget with other color as parent: But I dont understand my mistake in my first version. QWidget propagates explicit palette roles from parent to child. If you assign a brush or color to a specific role on a palette and assign that palette to a widget, that role will propagate to all the widget's children, overriding any system defaults for that role. Note that palettes by default don't propagate to windows (see isWindow()) unless the Qt::WA_WindowPropagation attribute is enabled. (from: https://doc.qt.io/qt-5/qwidget.html#palette-prop)
  • Weird Tab Key bug

    Unsolved
    3
    0 Votes
    3 Posts
    384 Views
    Pl45m4P
    @grombog said in Weird Tab Key bug: When I press the Tab key through line edits it doesn't function normally. It's neither weird, nor a bug. As @Kent-Dorfman said, you can change the tab-order in QtD's Design Mode or by code. https://doc.qt.io/qt-5/qwidget.html#setTabOrder
  • Receiving float from Arduino "BLEFloatCharacteristic" via BLE

    Solved
    6
    0 Votes
    6 Posts
    953 Views
    artwawA
    @mpergand thanks.
  • Signals and slots didn't emitted

    Unsolved
    3
    0 Votes
    3 Posts
    284 Views
    M
    @jsulm yes you are right , after a few days, I found my code SetLimitVolt *LimitV = new SetLimitVolt(); in another void. sorry for this newbie's fault
  • Getting data from a web page.

    Solved
    5
    0 Votes
    5 Posts
    496 Views
    J
    @JonB said in Getting data from a web page.: @jenya7 said in Getting data from a web page.: access into incomplete type 'QNetworkReply' For the record: any time you get an incomplete type '...' message it means you have not included the required header file. Thank you. Good to know.
  • 0 Votes
    3 Posts
    283 Views
    JonBJ
    @echo_lovely There is no "problem". First time it is called you are (presumably) changing from no current item (0x0, nullptr) to some current item. Perfectly reasonable? So do not try to access prev->... if prev == nullptr.
  • warning: implicitly-declared ??

    Moved Unsolved
    3
    0 Votes
    3 Posts
    1k Views
    A
    @sierdzio I have disabled compiler warnings and still getting these. Warnings do no bother me but when I get real error it is a pain to scroll thru the warnings to get to it. Yes, I am adding 6.2.2. - hope it will make these disappear. Cheers