Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • Qt 6.2.2 macOS 12.1 aarch64 - Unable to run OOTB BLE Heart Rate Server Example

    Unsolved
    1
    0 Votes
    1 Posts
    159 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
    202 Views
    No one has replied
  • 0 Votes
    12 Posts
    2k Views
    AitorQtA
    Yeah, done!
  • Changing cursor in QTabBar

    Solved
    6
    0 Votes
    6 Posts
    671 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
    398 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
    214 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
    952 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
    407 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
    1k Views
    artwawA
    @mpergand thanks.
  • Signals and slots didn't emitted

    Unsolved
    3
    0 Votes
    3 Posts
    320 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
    543 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
    307 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
  • QProcess won't start executable on Windows

    Solved
    4
    0 Votes
    4 Posts
    332 Views
    S
    Hi @Christian-Ehrlicher, that solved it. Thank you :)
  • 0 Votes
    6 Posts
    813 Views
    W
    @escape said in How are native apps able to show user created content with text and images at random places? (placements inside a listview, etc): Is this only possible with web view? A web browser is a native application, so your premise is a bit confusing. If you want to show web content specifically, then you'll need to use something that can show web content like a WebView. If you want to show something arbitrary based on user input, then that just describes most applications. A picture viewer will show whatever image a user wants to open. A word processor will show whatever content a user types. A paint program will show whatever content a user draws, etc. A web browser isn't fundamentally any different from something like a word processor. The program displays stuff on screen based on data it has loaded. @escape said in How are native apps able to show user created content with text and images at random places? (placements inside a listview, etc): Is it normal to use a local html file in webengine and connect to python/c++ via webchannel to make a hybrid app? To fetch data from an api/server and displaying it in the app? People who are really used to web dev sometimes like to use HTML for making UI. Personally, I just find it confusing and overly complicated to add HTML and webs tuff to an application that doesn't need it because my background isn't mainly web stuff. But it's certainly not terribly unusual.
  • Serialization features in qt

    Solved
    5
    0 Votes
    5 Posts
    429 Views
    SGaistS
    Hi, In addition to my fellows: QXmlStreamReader and QXmlStreamWriter. One important thing: all tools suggested until now won't serialize your objects automagically for you.
  • qdebug compile problem

    Unsolved
    4
    0 Votes
    4 Posts
    526 Views
    O
    I now believe that it is not a QDeBug problem, but something in that particular program that is causing the problem. I tried two other old program and the qDeBug() worked. Sorry, I just jumped the gun on this.
  • What operating systems support QApplication setWindowIcon?

    Solved
    9
    0 Votes
    9 Posts
    905 Views
    SGaistS
    If you want to customize the dock tile then you'll have to use the native API. From the looks of it, create a QImage, draw whatever you want on it, convert to a NSImage and set it on the tile.