Results 1 to 7 of 7

Thread: QWebKit, QDataStream, QList

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2012
    Posts
    123
    Thanks
    4
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QWebKit, QDataStream, QList

    Hallo I have 2 problems:
    1. I do WebBrowser and when I set Application name
    Qt Code:
    1. QApplication a(argc, argv);
    2. a.setApplicationName("MyBrowser");
    3. Window w;
    To copy to clipboard, switch view to plain text mode 
    or
    Qt Code:
    1. QCoreApplication::setApplicationName(QLatin1String("MyBrowser"));
    2. QCoreApplication::setApplicationVersion(QLatin1String("0.1"));
    To copy to clipboard, switch view to plain text mode 
    now signal iconChanged() never emit but when i don't set Application name all work good

    2. I take all history items to QList<QAction *> history;
    save function:
    Qt Code:
    1. QFile historyFile("/History.bin");
    2. if(!historyFile.open(QIODevice::WriteOnly))
    3. {
    4. return;
    5. }
    6. QDataStream out(&historyFile);
    7. out.setVersion(QDataStream::Qt_4_8);
    8. out << allHistoryAction;
    9. historyFile.flush();
    10. historyFile.close();
    To copy to clipboard, switch view to plain text mode 
    all work but in load:
    Qt Code:
    1. QFile historyFile("/History.bin");
    2. if(!historyFile.open(QIODevice::ReadOnly))
    3. {
    4. return;
    5. }
    6. QDataStream in(&historyFile);
    7. in.setVersion(QDataStream::Qt_4_8);
    8. in >> allHistoryAction;
    9. historyFile.close();
    To copy to clipboard, switch view to plain text mode 
    this don't work error:
    error: no match for 'operator>>' in 's >> t'
    Last edited by Viper666; 18th September 2012 at 19:36.

Similar Threads

  1. Qlist<QLabel *> in Qlist<QAction*>
    By Naahmi in forum Qt Programming
    Replies: 1
    Last Post: 9th September 2011, 08:53
  2. Cast QList<Foo*> to QList<const Foo*>
    By vfernandez in forum Qt Programming
    Replies: 0
    Last Post: 4th October 2010, 16:04
  3. Replies: 4
    Last Post: 20th August 2010, 13:54
  4. Store QList<T> in QVariant and stream to QDataStream?
    By razvan.petru in forum Qt Programming
    Replies: 3
    Last Post: 18th September 2009, 09:10
  5. QDataStream and saving and loading QList
    By Noxxik in forum Qt Programming
    Replies: 3
    Last Post: 1st March 2009, 22:02

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.