Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.3k Posts
  • QPen output description?

    Unsolved
    3
    0 Votes
    3 Posts
    225 Views
    CJhaC
    @Christian-Ehrlicher Thanks :)
  • Qtableview calculation

    Unsolved
    15
    0 Votes
    15 Posts
    2k Views
    N
    [image: 27f27e9f-9fb3-4814-85da-dd71d2032184.png] There seem to be 3 models. Why do you have 3 separate models? What you seem to have is one model, with 2 columns of input data (P & N) and 3 columns of calculated data colored column will be user input and other column have some formula when use enter data so other column should update accordingly if for one table i implement then i understand how to do so i just shared one table picture so i dont understand the implementation of formula . Unless you have some requirement I don't understand, that is what you want.
  • Building QtPDF MSVC

    Unsolved
    1
    0 Votes
    1 Posts
    169 Views
    No one has replied
  • QNetworkAccessManager.setNetworkAccessible() is obsolete in Qt 5.15?

    Unsolved
    3
    0 Votes
    3 Posts
    365 Views
    D
    @JKSH When the system can access the LAN but cannot access the Internet, my http request in LAN will occurred an error "Network access is disabled",and i found call setNetworkAccessible(QNetworkAccessManager::UnknownAccessibility) can solve this problem.
  • array append to scatter chart

    Unsolved
    5
    0 Votes
    5 Posts
    1k Views
    Crawl.WC
    @MohsenNz Still, it shouldn't be so slow. When I was faced with this problem, I am using qml too. As far as I know, using the method mentioned by @JonB in QML, use the item provided by QML, still very slow. Then, I transferred to QWT, which provide the chart component. I used QQuickPaintedItem to paint qwt chart canvas.
  • 0 Votes
    2 Posts
    1k Views
    ?
    FYI After further steps ithe issue was recognised as the bug. Fix: https://bugreports.qt.io/browse/QTBUG-93021
  • Markdown controls for QTextEdit?

    Unsolved
    4
    0 Votes
    4 Posts
    396 Views
    SGaistS
    No there's not, but you can easily build one with a QTooBar for example.
  • How to set QGroupBox in the center?

    Unsolved
    2
    0 Votes
    2 Posts
    196 Views
    SGaistS
    Hi, Did you put your QGrouoBox in a layout ?
  • Where can i look at examples of Qt Desktop apps with modern and beautiful GUI

    Unsolved
    4
    0 Votes
    4 Posts
    511 Views
    SGaistS
    Hi, Take a look at KDE's set of application: Kate, Krita, Kdevelop and many others.
  • Window widget not moving with move()

    Solved
    3
    0 Votes
    3 Posts
    2k Views
    Xena_oX
    @Pl45m4 thank you ! with your help i could figure out how the code should be: wCon = new myWindow(this); QMdiSubWindow *cw = new QMdiSubWindow; cw->setWidget(wCon); //destroy window on close cw->setAttribute(Qt::WA_DeleteOnClose); //add window to MDI area ui->mdiArea->addSubWindow(cw); //put window in middle of MDI cw->move(wCon->rect().center()); //show the window cw->show(); this code works well ! thanks !
  • Scrollbars don't show

    Solved scrollbar
    13
    0 Votes
    13 Posts
    9k Views
    Q
    @N-Sumi @gabor53 Hey, Sorry I get that this is quite old post. But asking incase if you have a solution. I understood how to add this in code and get it. But is there a way to set this property in QtDesigner? So that every time I modify my design, I need not type explicitly in the generated code. I cannot find this property. Could you please let me know if we can do this in Qt designer
  • QDialog CloseEvent

    Solved
    2
    0 Votes
    2 Posts
    578 Views
    N
    https://stackoverflow.com/questions/10369826/how-can-i-disable-alt-f4-window-closing-using-qt
  • How to handle signals and slots inside cpp dll?

    Unsolved qt5
    7
    0 Votes
    7 Posts
    1k Views
    Chris KawaC
    @Selvajothi as I said - you need an instance of serverAuthentication passed to connect QObject::connect(networkaccess, SIGNAL(finished(QNetworkReply*)), __here__, SLOT(getcredential(QNetworkReply*))); ^ //you need a pointer to instance of serverAuthentication Where do you get it from? That's up to you. Also you're still leaking memory and have all the other issues I listed previously. Usually when working with C style libraries you have it organized kinda like this: void init(); // Creates instances of any "global" things you need, e.g. serverAuthentication and QNetworkAccessManager something doSomething(); // Does something with the global instances, like your AuthenticateServer function void shutdown(); // Destroys the global instances
  • 0 Votes
    3 Posts
    338 Views
    S
    thank you
  • LNK1158: cannot run 'rc.exe'

    Solved
    3
    0 Votes
    3 Posts
    316 Views
    VRoninV
    If you don't have to actually run the deployment from your laptop you can just download the MinGW version of the Qt version you can use and develop/test on that. Unless the software is super low level there shouldn't be any incompatibility due to changing the compiler
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • can anybody explain why QStringList() used in below line ?

    Solved
    3
    0 Votes
    3 Posts
    229 Views
    Christian EhrlicherC
    @sierdzio said in can anybody explain why QStringList() used in below line ?: sCommand.toLatin1().data() btw: this is useless and even wrong when the command contains non-latin1 characters
  • Insert one text to QListView

    Solved
    2
    0 Votes
    2 Posts
    2k Views
    Christian EhrlicherC
    QStringListModel has (like every other QAbstractItemModel) the function https://doc.qt.io/qt-5/qstringlistmodel.html#insertRows and https://doc.qt.io/qt-5/qstringlistmodel.html#setData to insert rows and modify the data.
  • QWidget::mouseMoveEvent() with and without button pressed

    7
    0 Votes
    7 Posts
    8k Views
    Pl45m4P
    @texas Yeah, I believe the OP is still sitting in front of his computer looking for a solution :)
  • QGraphicsScene left click selects an item AND drags a rubberband.

    Solved
    2
    0 Votes
    2 Posts
    1k Views
    H
    Exactly 8 months later, I finally managed to make it work the way that I want, so I'm posting the answer. Subclass both QGraphicsView and QGraphicsScene. For both of them mousePressEvent has to be reimplemented as follows: QGraphicsView subclass: void CustomView::mousePressEvent(QMouseEvent* event) { QGraphicsView::mousePressEvent(event); QGraphicsView::mousePressEvent(event); //yes, just call it twice // we're gonna lie to the view that the event is not handled >:) } QGraphicsScene subclass: void CustomScene::mousePressEvent(QGraphicsSceneMouseEvent* event) { if (event->button() != Qt::LeftButton) { event->accept(); return; } QGraphicsItem* item = itemAt(event->scenePos(), QTransform()); if (item != nullptr && !item->isSelected()) { item->setSelected(1); } } Debugging the code, I noticed, the last line - item->setSelected(1) is called on each of the two calls in the CustomView. However on the first call, the item is immediately deselected, since the event is not handled and the GraphicsView starts the rubberband selection, deselecting the item. The second call is where the item is permently selected, since the rubberband already exists. Not a very elegant solution, but it works like a charm. If anyone knows a better way, feel free to share it.