Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • How to make a QPushButton appear as a shaped back button similar to iOS?

    3
    0 Votes
    3 Posts
    2k Views
    Chris KawaC
    Or just use a custom image with a stylesheet: button->setStyleSheet("background-image: url(...)")
  • Various crashes when using QNetworkAccessManager

    qnetworkaccessm qdialog
    13
    0 Votes
    13 Posts
    6k Views
    K
    @Chris-Kawa OK, thanks for advise. I had checked in the mean time with Qt 5.3 and designer does also do a pointer assignment now. I have started years ago with MSVC and addin. I guess those dialogs are from that time. Never seen this possibility (at least I do not remember). Anyway the thing is the generated code has to work and it does either way. Unfortunately, I step into this trap and giving wrong advise.
  • 0 Votes
    1 Posts
    753 Views
    No one has replied
  • Get undefined reference error but don't know why

    4
    0 Votes
    4 Posts
    3k Views
    P
    I've also had the same problem that I solved the same way. I happened on Windows and ever on Linux
  • Qt5.4.1 Windows7 QProcess [SOLVED]

    8
    0 Votes
    8 Posts
    3k Views
    P
    @Chris-Kawa said: No. I just said you shouldn't! Not all users have it installed in that path and not all users even have drive C:. Stick with the QDesktopServices. I understand that isn't the correct approach but I want to do a test with QProcess to learn to use it. In my program I will use , obviously , QDesktopServices :: OpenURL. Again thanks for the help Chris-Kawa
  • QUrl and QNetworkReply errors

    2
    0 Votes
    2 Posts
    1k Views
    Resurr3ctionR
    Ok, I solved the first problem. It was due to me elsewhere using remove on the url string and me thinking the function returns modified copy while it modified the stirng itself. One solved, two more to go...
  • Error when opening a second window from clicking a button

    second window qt5 open
    1
    0 Votes
    1 Posts
    634 Views
    No one has replied
  • 0 Votes
    3 Posts
    3k Views
    E
    Sort the tree view by click a column. Set the view can be sorted by click the "header". treeView_->setSortingEnabled(true); Connect the header signal to a slot made by you. connect(treeView_->header(), SIGNAL(sortIndicatorChanged(int, Qt::SortOrder)), treeModel_, SLOT(sortByColumn(int, Qt::SortOrder))); In the slot, call the sort() virtual function of the model. sort() virtual function is a virtual function of QAbstractItemModel, and one should override it. void TreeModel::sortByColumn(int column, Qt::SortOrder order) { sort(column, order); } Override the sort() function as your model should do. emit dataChanged(QModelIndex(), QModelIndex()); from a model to update the whole tree view.
  • Build windows qt dll project on Mac OS

    qt dll mac
    2
    0 Votes
    2 Posts
    985 Views
    SGaistS
    Hi and welcome to devnet, Are you asking something like: how can i build my application ?
  • selecting text using qlineedit while changing focus

    6
    0 Votes
    6 Posts
    3k Views
    SGaistS
    Ho are you setting the focus on the QLineEdit ?
  • [SOLVED] How to destroy widget when close QDockWidget

    14
    0 Votes
    14 Posts
    26k Views
    G
    @maxim.prishchepa Also I just wanted to add so that other users will get this info as well. It didn't start working until I did QDockWidget.setParent(None). Unparenting it allowed Qt to finally destroy the widget once the parent wasn't holdinging onto it anymore.
  • GraphicsView: Unobscured part of an Item

    qgraphicsitem
    1
    0 Votes
    1 Posts
    380 Views
    No one has replied
  • [SOLVED] draw mathematical scheme

    7
    0 Votes
    7 Posts
    2k Views
    youzkingY
    @SGaist yes , i installed it , it is interesting , ! but do it manually still the best solution , even it is little more complicated thanks for ur help ^^
  • Creating a Ribbon Control

    1
    0 Votes
    1 Posts
    585 Views
    No one has replied
  • QSharedPointer Usage Found

    qsharedpointer
    8
    0 Votes
    8 Posts
    7k Views
    S
    Yes, Chris. That is right, once use shared pointer, never delete it. This is the QSharedPointer.data() document in help. see content in [] do not delete the pointer returned by this function or pass it to another function that could delete it, [including creating QSharedPointer or QWeakPointer objects.]
  • How can I set QTableWidget header item background color to initial value?

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • 0 Votes
    1 Posts
    819 Views
    No one has replied
  • Not able to fix my picture file to Wanted resolution

    qpalette qgridlayout qpixmap
    3
    0 Votes
    3 Posts
    1k Views
    H
    Did two thing. Using recommended code below, compilation Error appear ->"The program has unexpectedly finished" QImage myImage; myImage.load(":/file/rightp.png"); myImage.scaled(1366,254, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); How to scale stylesheet to 1/4 of mainwindow using below code MainWindow w; w.setStyleSheet("background-image:url(./file/left.png)"); w.show();
  • [Solved] QTableView item update Automatically???

    qt 5.4.1 qtable
    11
    0 Votes
    11 Posts
    8k Views
    sierdzioS
    Ha, that is good to hear. Happy coding!
  • Calling Qfiledialog form openglwindow example

    5
    0 Votes
    5 Posts
    2k Views
    Q
    In openglwindow . cpp if(e->key() == Qt::Key_5){ filenam = QFileDialog::getOpenFileName(0,"Vali graafiku fail"); } Call from main also cause problems. Is only way to make opengl draw from other thread or could use same thread for gui as well?