Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • Nested box layouts giving unexpected results

    Solved
    16
    0 Votes
    16 Posts
    1k Views
    dheerendraD
    This is where your QStackWidget comes. Now create the instance of WindowLayout objects in your CertTool. Do the rest of the stuff as shown below. pPageOne = new WindowLayout pPageTwo = new WindowLayout pPageThree = new WindowLayout pStackedWidget = new QStackedWidget(this); // Add pages to stacked widget pStackedWidget->addWidget(pPageOne); pStackedWidget->addWidget(pPageTwo); pStackedWidget->addWidget(pPageThree); // Set Page One as start page pStackedWidget->setCurrentWidget(pPageOne); setCentralWidget(pStackedWidget); // Window settings window()->setWindowTitle("App"); window()->setMinimumSize(600,450); // Connect pages to CertTool to allow changing of stacked widget index connect(pPageOne, SIGNAL(setPage(int)), this, SLOT(setPage(int))); connect(pPageTwo, SIGNAL(setPage(int)), this, SLOT(setPage(int))); connect(pPageThree, SIGNAL(setPage(int)), this, SLOT(setPage(int)));
  • Get current application QStyle

    Unsolved
    8
    0 Votes
    8 Posts
    2k Views
    mrjjM
    @Sixshaman Thats odd as if i modify the NorwegianWoodStyle example like void WidgetGallery::changeStyle(const QString &styleName) //! [5] //! [6] { if (styleName == "NorwegianWood") { QApplication::setStyle(new NorwegianWoodStyle); NorwegianWoodStyle *mine = qobject_cast<NorwegianWoodStyle *>(QApplication::style()); } else { QApplication::setStyle(QStyleFactory::create(styleName)); } changePalette(); } It does report the expected type and cast do not fail.
  • Error with QNetworkSession::interface()

    Unsolved
    16
    0 Votes
    16 Posts
    2k Views
    ODБOïO
    @jsulm no, nothing
  • scheduler calender

    Unsolved
    13
    0 Votes
    13 Posts
    2k Views
    VRoninV
    @mrjj said in scheduler calender: One way is to subclass QCalendarWidget QCalendarWidget has a lot of stuff buried in the private implementation, you are probably better off just using custom model+QSortFilterProxyModel+QTableView+custom delegate
  • Event Calender

    Locked Unsolved
    3
    0 Votes
    3 Posts
    398 Views
    RatzzR
    @satyanarayana143 Seems like duplicate of https://forum.qt.io/topic/97374/scheduler-calender
  • how to provide custome signal in CustomWidget plugin?

    Unsolved
    2
    0 Votes
    2 Posts
    315 Views
    dheerendraD
    Provide signals in your implementation object as usual. connect with QObject* not with interface.
  • 0 Votes
    3 Posts
    3k Views
    D
    Another way is to create .dmg file by hdiutil create instead of macdeployqt -dmg . mkdir ui-release cd ui-release ln -s /Applications cd .. mv $appfolder ui-release/ hdiutil create -volname $volname -srcfolder ui-release/ -ov -format UDZO $dmgfilename
  • does parentClass's Q_OBJECT work for nestedClass?

    Unsolved
    2
    1 Votes
    2 Posts
    330 Views
    VRoninV
    @opengpu said in does parentClass's Q_OBJECT work for nestedClass?: so can i write like this? Yes (as long as you don't declare signal/slots/properties/invokables in the inner class). Whether you should is another topic. i found this is illegal: It's not illegal per-se it's just that moc is not smart enough to handle it. It is valid if you skip moc using, for example, Verdigris
  • Cross-target GDB on Windows host with Python support for Linux-x86_64 target

    Unsolved
    1
    0 Votes
    1 Posts
    178 Views
    No one has replied
  • Pyqt5 vertical scrollbar

    Unsolved
    2
    0 Votes
    2 Posts
    366 Views
    jsulmJ
    @Clemo You can take a look at this example app: http://doc.qt.io/qt-5/qtwidgets-widgets-sliders-example.html Can you use QScrollArea instead?
  • how to speed up when I need to draw huge number of objects in a view?

    Unsolved
    5
    0 Votes
    5 Posts
    601 Views
    A
    @vigi Look at the 40000 chips example. It basically does what you want. But I have serious doubts that you can make it work efficiently with 50 million objects. What is your actual use case?
  • 0 Votes
    4 Posts
    2k Views
    P
    @sierdzio said in when should Generating "moc" files in qt project,and what is the "moc" files's function?: moc files are generated by moc tool (Meta Object Compiler) - they are always generated for all QObject classes. They are absolutely required for meta stuff to work, so things like: signals slots Q_INVOKABLE QMeta* classes However, these files are generated at build time. You don't need to keep them in your project, same as you don't need to store Makefiles, object files etc. Actually, I strongly recommend building your code outside of your source code directory. Qt Creator does this automatically (it's called a "shadow build"). Other code generators in Qt include: uic (generates UI headers from .ui files) rcc (generates cpp resource files from .qrc files) lupdate/lrelease (for translations) thank you very much!
  • Missing icons on "ssh -X" execution (fallback theme issue)

    Unsolved
    1
    0 Votes
    1 Posts
    421 Views
    No one has replied
  • How to use REPC ?

    Solved
    11
    0 Votes
    11 Posts
    2k Views
    W
    Hi again, Just a short statement to tell you that all works correctly now. Must have been a problem with paths of different qt installations... Thanks for your help! best regards Winkl
  • How to change the mouse cursor color in Qt Creator?

    Unsolved
    6
    0 Votes
    6 Posts
    1k Views
    A
    @Ratzz text editor is Monaco (misspelled as Monaro in first post)
  • [SOLVED]how to check if QMouseEvent::pos inside a QWidget?

    Solved
    3
    0 Votes
    3 Posts
    1k Views
    Christian EhrlicherC
    Then please mark the topic as solved, thx
  • classes with QtimerEvent

    Unsolved
    18
    0 Votes
    18 Posts
    2k Views
    jsulmJ
    @qt_ankit_developer It's not about QMainWindow or QObject (QMainWindow is a QObject by the way). You should read about scopes in C++, else you will do the same mistake again and again...
  • Syntax Errors When Including Header (QChart Headers)

    Solved
    12
    0 Votes
    12 Posts
    3k Views
    6thC6
    Yes that's the page I linked earlier. Yes, I'm aware of that, that's how I normally use reference material. It's very nice to have. Reading this page when I started out seemed to indicate to me that I also needed to do this, which I do not. It's ok, I've said my piece. I've learned, I was just trying to assist. I'm happy to leave it here.
  • why I need add the same .a and .dylib file to my Mac qt project

    Unsolved
    2
    0 Votes
    2 Posts
    368 Views
    jsulmJ
    @Princein said in why I need add the same .a and .dylib file to my Mac qt project: macx: LIBS += -L$$PWD/../../../../../../usr/local/Cellar/boost/1.67.0_1/lib/libboost_system.a I don't know why both were added, but this line is wrong. If you add libs using -l you have to remove "lib" prefix. Another thing wrong with this line: -L specifies a directory where libs can be found not a specific lib.
  • EVDEV calibration

    Unsolved
    1
    0 Votes
    1 Posts
    284 Views
    No one has replied